1. 安装依赖包
[root@centos8 ~]# sudo yum install -y curl policycoreutils-python openssh-server
[root@centos8 ~]# sudo systemctl enable sshd
[root@centos8 ~]# sudo systemctl start sshd
2. 关闭防火墙,或者开放HTTP的端口
[root@centos8 ~]# iptables -F
3. 安装邮件服务,当gitlab想通过邮件通知,可另外配置其它的邮件服务器
[root@centos8 ~]# sudo yum install postfix
[root@centos8 ~]# sudo systemctl enable postfix
[root@centos8 ~]# sudo systemctl start postfix
4. 下载gitlab
[root@centos8 ~]# wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/gitlab-ce-12.10.1-ce.0.el8.x86_64.rpm
5. 安装
[root@centos8 ~]# rpm -i gitlab-ce-12.10.1-ce.0.el8.x86_64.rpm
6. 编辑ip和端口
[root@centos8 ~]# vim /etc/gitlab/gitlab.rb
external_url ‘http://192.168.13.221:8099‘
[root@centos8 ~]# gitlab-ctl reconfigure
[root@centos8 ~]# gitlab-ctl restart
7. 测试访问gitlab ip+端口
http://192.168.13.221:8099
出现502报错~~~
8. 重新配置并启动
[root@centos8 ~]# gitlab-ctl reconfigure
[root@centos8 ~]# gitlab-ctl restart #重启
[root@centos8 ~]# gitlab-ctl stop #开启
[root@centos8 ~]# gitlab-ctl start #启动