1.安裝GitLab-ce社區(qū)版
1.1 安裝依賴關(guān)系
# sudo dnf install policycoreutils openssh-server postfix
1.2開啟SSH并設(shè)置開機啟動
# systemctl enable sshd
# systemctl start sshd
1.3開放系統(tǒng)防火墻的HTTP和HTTPS訪問
# sudo firewall-cmd --add-service=http --permanent
# sudo firewall-cmd --add-service=https --permanent
#? sudo firewall-cmd --permanent --zone=public --add-port=8899/tcp
#? sudo firewall-cmd --permanent --zone=public --add-port=8088/tcp
# sudo firewall-cmd --reload
1.4 配置Postfix郵件服務(wù)鹅很,設(shè)置開機啟動
# sudo systemctl enable postfix
# sudo systemctl start postfix
1.5下載gitlab
下載地址:
官網(wǎng):https://packages.gitlab.com/gitlab/gitlab-ce/
清華大學(xué)鏡像:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/
直接Cetnos8下載
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/gitlab-ce-13.1.1-ce.0.el8.x86_64.rpm
或通過Windows下載后上傳至Cetnos
1.6安裝
# rpm -i gitlab-ce-13.1.1-ce.0.el8.x86_64.rpm
1.7修改配置文件
# vim /etc/gitlab/gitlab.rb
將下面這3行打開注釋
unicorn['port'] = 8088
postgresql['shared_buffers'] = "256MB"
配置gitlab
# gitlab-ctl reconfigure
# gitlab-ctl start?
完成編譯后顯示結(jié)果:
啟動
1.8第一次登錄需要修改root密碼, 密碼8位以上,修改完就可以登錄
其他:
gitlab常用命令
gitlab-ctl start # 啟動所有 gitlab 組件希痴;
gitlab-ctl stop? ? ? ? # 停止所有 gitlab 組件;
gitlab-ctl restart? ? ? ? # 重啟所有 gitlab 組件作谭;
gitlab-ctl status? ? ? ? # 查看服務(wù)狀態(tài)谈截;
vim /etc/gitlab/gitlab.rb? ? ? ? # 修改gitlab配置文件婴削;
gitlab-ctl reconfigure? ? ? ? # 重新編譯gitlab的配置晦炊;
gitlab-rake gitlab:check SANITIZE=true --trace? ? # 檢查gitlab璧瞬;
gitlab-ctl tail? ? ? ? # 查看日志栈暇;
gitlab-ctl tail nginx/gitlab_access.log
cat /opt/gitlab/embedded/service/gitlab-rails/VERSION? #查看版本