- 下载GitLab:
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-12.1.3-ce.0.el7.x86_64.rpm
- GitLab依赖安装:
yum install curl openssh-server openssh-clients postfix cronie
service postfix start
systemctl enable postfix.service
-
GitLab安装:
rpm -i gitlab-ce-12.1.3-ce.0.el7.x86_64.rpm
(等待安装完成)
-
配置:
gitlab-ctl reconfigure
(等待时间较长) 若安装过程遇到“ ruby_block[wait for redis service socket] action run”处卡住,可通过alt+c退出,并执行systemctl restart gitlab-runsvdir
,再继续执行gitlab-ctl reconfigure
,如安装过程遇到报错信息,可重复执行gitlab-ctl reconfigure
-
修改external_url配置:
vim /etc/gitlab/gitlab.rb
-
再次执行:
gitlab-ctl reconfigure
-
启动:
gitlab-ctl restart