一、安装并配置必要的依赖关系
#安装依赖
yum install -y curl policycoreutils-python openssh-server postfix
#开启ssh访问,设置开机启动
systemctl start sshd
systemctl enable sshd
#关闭防火墙,关闭开机启动
systemctl stop firewalld
systemctl disable firewalld
#开启Postfix发送通知邮件
systemctl start postfix
systemctl enable postfix
二、rpm安装
rpm安装包下载地址:清华开源网站镜像
这里选择gitlab-ce-13.5.4-ce.0.el7.x86_64.rpm
rpm -ivh gitlab-ce-13.5.4-ce.0.el7.x86_64.rpm
三、修改gitlab配置
-
修改域名
vim /etc/gitlab/gitlab.rb #修改如下,端口号自己定义,不冲突就行 external_url 'http://ip:8085' unicorn['port'] = 8086
-
更新配置
gitlab-ctl reconfigure
-
查看状态
gitlab-ctl status
-
重启gitlab
gitlab-ctl restart