1,安裝依賴
yum install -y curl policycoreutils-python openssh-server
centos8沒有policycoreutils-python yum源,不用管
2,啟動ssh並設置為開機自啟動
systemctl enable sshd
systemctl start sshd
3,添加http服務到firewalld,pemmanent表示永久生效,若不加--permanent系統下次啟動后就會失效
systemctl start firewalld
firewall-cmd --permanent --add-service=http
systemctl reload firewalld
4,啟動postfix
systemctl enable postfix
systemctl start postfix
5,下載gitlab
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/gitlab-ce-12.10.1-ce.0.el8.x86_64.rpm
6,安裝
rpm -i gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm
成功如圖:
7,編輯ip和端口
vim /etc/gitlab/gitlab.rb
gitlab-ctl reconfigure
gitlab-ctl restart
8,訪問gitlab ip+端口
如果輸入端口和ip一直無法響應,可以關閉防火牆
systemctl stop firewalld
如果訪問502,查看
https://www.cnblogs.com/stronger-xsw/p/12804002.html
重新配置並啟動
gitlab-ctl reconfigure
gitlab-ctl restart
開啟:
gitlab-ctl start
關閉:
gitlab-ctl stop
9,成功如圖:
10,第一次登錄需要修改root密碼, 密碼8位以上,修改完就可以登錄
使用設置的新密碼,登錄
其他操作類似添加賬號,倉庫等等自己百度