1.卸载防火墙、关闭Selinux
]# yum -y remove firewalld
]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
2.添加gitlab用户
]# useradd -s /sbin/nologin gitlab
3.安装依赖 # policycoreutils-python CentOS8 没有这个包不用管
]# yum install curl openssh-server postfix wget git patch policycoreutils-python -y
]# systemctl enable postfix && systemctl start postfix
4.安装gitlab
]# wget https://mirror.tuna.tsinghua.edu.cn/gitlab-ee/yum/el8/gitlab-ee-13.1.4-ee.0.el8.x86_64.rpm
]# yum -y install gitlab-ee-13.1.4-ee.0.el8.x86_64.rpm
5.配置文件修改
]# vim +812 /etc/gitlab/gitlab.rb
29 external_url 'http://www.xxx.com' #你的域名或者IP地址
812 user['username'] = "gitlab"
813 user['group'] = "gitlab"
6.加载GitLab资源
]# gitlab-ctl reconfigure (根据机器 4-15分钟)
# 启动
]# gitlab-ctl start
# 关闭
]# gitlab-ctl stop
# 重启
]# gitlab-ctl restart
# 列出所有服务
]# gitlab-ctl service-list
# 查看各服务状态
]# gitlab-ctl status