安裝Gitlab第三方依賴
yum install -y curl policycoreutils-python openssh-server
yum install postfix
添加Gitlab官方軟件源
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
安裝Gitlab-ce
yum install -y gitlab-ce
出現以下信息,表示安裝成功
配置Gitlab
修改配置文件vim /etc/gitlab/gitlab.rb
修改external_url 'http://你的服務器地址或者域名'
重啓Gitlab應用配置gitlab-ctl restart
訪問http://你的服務器地址或者域名 會讓你設置root登錄密碼
Gitlab啓動|停止|狀態|重啓
啓動:gitlab-ctl start
停止:gitlab-ctl stop
狀態:gitlab-ctl status
重啓:gitlab-ctl restart