1、 前提準備(阿里云服務器已啟動ssh,此步驟已經具備,不需做)
(1) 安裝依賴
yum install -y curl policycoreutils-python openssh-server
centos8沒有policycoreutils-python yum源,不用管
(2) 啟動ssh并設定為開機自啟動
systemctl enable sshd
systemctl start sshd
2、 添加http服務到firewalld,pemmanent表示永久生效,若不加--permanent系統下次啟動后就會失效
systemctl start firewalld
firewall-cmd --permanent --add-service=http
systemctl reload firewalld
3、 啟動postfix,設定郵件服務自啟動
yum install policycoreutils-python-utils postfix (注意:系統可能已安裝)
systemctl enable postfix
systemctl start postfix
4、 環境和安裝包準備(要求當前用戶:root)
系統:CentOS-8.2.2004-x86_64-minimal.iso ,安裝的是最小化標準版 且 /etc/selinux/config 配置已禁用
下載 gitlab:wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/gitlab-ce-13.3.0-ce.1.el8.x86_64.rpm
5、 安裝gitlab
rpm -ivh gitlab-ce-13.3.0-ce.1.el8.x86_64.rpm
6、 配置gitlab13
(1)編輯 /etc/gitlab/gitlab.rb 找到 external_url 'http://xxxxxxxx' 改成自己的地址 external_url 'http://192.168.x.x:8489'
編輯檔案詳細查看“vi"命令,
(2)添加防火墻埠
firewall-cmd --add-port=8489/tcp --permanent
firewall-cmd –reload
(3)重新讀取配置
gitlab-ctl reconfigure
注意:此步驟時間比較長,耐心等待,一直到出現下圖結束陳述句,

(4)重啟服務
gitlab-ctl restart
[此處不用執行,作為記錄學習,開啟:gitlab-ctl start 關閉:gitlab-ctl stop]
7、 成功如圖:

8、 GitLab修改root密碼
第一次登錄需要修改root密碼, 密碼8位以上,修改完就可以登錄,(如上圖)
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/106199.html
標籤:其他
