安装gitlab

简介: 安装gitlab

1.配置yum源

vim /etc/yum.repos.d/gitlab-ce.repo

内容

[gitlab-ce]
name=Gitlab CE Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
gpgcheck=0
enabled=1

以上资源地址根据具体情况可以换成阿里、网易等

https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/

2.更新本地yum缓存

yum makecache

3.更新系统软件库

安装gitlab之前,先更新以下系统软件库

yum update -y

4.安装gitlab依赖库

sudo yum install -y curl policycoreutils-python openssh-server perl

出现以下错误

Error: Unable to find a match: policycoreutils-python

参考了这篇文章也没有解决,后续直接不检查依赖安装

https://blog.csdn.net/P_L_Wen97/article/details/123329885

5.开启端口

开放http与https端口

firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
systemctl reload firewalld

6. 启动sshd服务

systemctl enable sshd
systemctl start sshd

7. 安装 Postfix 以发送电子邮件通知

yum install -y postfix
systemctl enable postfix
systemctl start postfix

具体配置可以参考

https://docs.gitlab.cn/omnibus/settings/smtp.html

8.安装gitlab

安装可以参考官网的安装方式

https://gitlab.cn/install/

这里采用rpm包的安装方式,下载gitlab的rpm包,下载地址

https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/

最新的发布版本gitlab-ce-15.8.3-ce.0.el7.x86_64 ,安装文件大小 1.1G

安装

rpm -ivh gitlab-ce-15.8.3-ce.0.el7.x86_64.rpm

出现步骤 4.安装gitlab依赖库 的错误

直接不检查依赖安装

rpm -ivh gitlab-ce-15.8.3-ce.0.el7.x86_64 --force --nodeps

修改配置文件/etc/gitlab/gitlab.rb的配置项external_url

vi /etc/gitlab/gitlab.rb

指向服务器的ip地址

external_url 'http://192.168.10.66'

重新加载配置,并重启 GitLab 服务,执行命令

gitlab-ctl reconfigure
gitlab-ctl restart

获取root用户密码

cat /etc/gitlab/initial_root_password

9.附录

最终发现使用docker方式安装是最简单的

https://docs.gitlab.cn/jh/install/docker.html#使用-docker-engine-安装极狐gitlab
https://docs.gitlab.cn/jh/install/docker.html#使用-docker-compose-安装极狐gitlab

获取root用户密码

docker ps
docker exec -it 93789f8225b8 /bin/bash
cat /etc/gitlab/initial_root_password
参考
https://blog.csdn.net/m0_52091913/article/details/127009412
相关文章
|
5月前
|
网络安全 开发工具 数据安全/隐私保护
Gitlab的安装
Gitlab的安装
80 0
|
4月前
|
存储 网络安全 数据安全/隐私保护
docker 安装gitlab,配置邮件,备份全流程
docker 安装gitlab,配置邮件,备份全流程
142 0
|
30天前
|
Linux 网络安全 开发工具
linux安装gitlab
linux安装gitlab
24 2
|
1月前
|
Devops 开发工具 数据安全/隐私保护
Docker Swarm总结+CI/CD Devops、gitlab、sonarqube以及harbor的安装集成配置(3/5)
Docker Swarm总结+CI/CD Devops、gitlab、sonarqube以及harbor的安装集成配置(3/5)
56 0
|
1月前
|
NoSQL 关系型数据库 MySQL
Docker安装详细步骤及相关环境安装配置(mysql、jdk、redis、自己的私有仓库Gitlab 、C和C++环境以及Nginx服务代理)
Docker安装详细步骤及相关环境安装配置(mysql、jdk、redis、自己的私有仓库Gitlab 、C和C++环境以及Nginx服务代理)
221 0
|
2月前
|
数据安全/隐私保护 Docker 容器
【Docker】安装gitlab 傻瓜式复制安装
【Docker】安装gitlab 傻瓜式复制安装
58 0
|
2月前
|
数据安全/隐私保护 Docker 容器
百度搜索:蓝易云【Docker中gitlab以及gitlab-runner的安装与使用】
现在,你已经成功在Docker中安装和使用了GitLab以及GitLab Runner。祝你使用愉快!
32 1
|
4月前
|
开发工具 git
hbuilderX安装git插件→拉取线上gitlab项目
hbuilderX安装git插件→拉取线上gitlab项目
|
4月前
|
存储 Linux 网络安全
Git - Centos7下安装GitLab服务器
Git - Centos7下安装GitLab服务器
97 1
|
6月前
|
Prometheus 监控 Cloud Native
私有仓库Gitlab的安装与汉化
私有仓库Gitlab的安装与汉化
108 0