1、开启HTTP和SSH访问
yum install -y curl policycoreutils-python openssh-server
systemctl enable sshd
systemctl start sshd
2、安装并启用邮件服务
yum install postfix
systemctl enable postfix
systemctl start postfix
3、下载安装gitlab
#选择清华大学镜像,按需选择版本
https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/gitlab-ce-14.9.2-ce.0.el8.x86_64.rpm
安装完成之后,会显示gitlab的图标,则表示完成
4、配置gitlab
gitlab.rb在 /etc/gitlab/gitlab.rb下,先备份一个,然后以下内容
external_url = 'http://ip:prot/git'
#默认不设置端口为8080,为了不存在占用问题,建议修改
#git为nginx的反向代理名称
5、重新加载配置并重启gitlab
gitlab-ctl reconfigure #可能存在死机问题,建议重启服务器
gitlab-ctl restart