一、GitLab英文版安裝
1.下載gitlab安裝包,然后安裝
wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-10.8.4-ce.0.el7.x86_64.rpm/download.rpm
2.下載安裝python
yum install policycoreutils-python
3.安裝gitlab
rpm -ivh gitlab-ce-10.8.4-ce.0.el7.x86_64.rpm
4.修改配置文件
將external_url變量的地址修改為gitlab所在centos的ip地址(或者域名)
vim /etc/gitlab/gitlab.rb
5.使配置生效並啟動GitLab
gitlab-ctl reconfigure
gitlab-ctl restart
在瀏覽器輸入ip:端口號即可訪問GitLab web頁面,輸入密碼后進入系統。如果不需要漢化,至此已安裝完成(如果需要郵件服務 還需修改配置文件)
二、 GitLab漢化
1、安裝git
yum install -y git
2.克隆漢化補丁倉庫
git clone https://gitlab.com/xhang/gitlab.git
3.查看當前gitlab版本並且獲取對應版本的中文補丁
head -1 /opt/gitlab/version-manifest.txt
cd gitlab
git diff v10.8.4 v10.8.4-zh > ../v10.8.4-zh.diff
4.將中文補丁導入gitlab
gitlab-ctl stop
patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < ../v10.8.4-zh.diff #一路回車知道完成
5.重新配置並啟動
gitlab-ctl reconfigure
gitlab-ctl start