git clone https://gitlab.com/xhang/gitlab.gitjavascript
【把克隆倉庫打包壓縮了,正式環境安裝時不用外網下載。java
patch組件不知道rhel是否自帶,注意。】git
head -1 /opt/gitlab/version-manifest.txt
web
cd gitlab
app
git diff v11.1.4 v11.1.4-zh >../v11.1.4-zh.diff
gitlab
#進入剛纔clone下來的gitlab目錄
#用diff將英文原版與中文版的對比生成.diff文件
gitlab-ctl stop
#中止gitlabthis
patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < ../v11.1.4-zh.diff
#將剛纔的diff文件作爲補丁導入到gitlab中
#patch可能須要自行安裝:yum install -y patch
gitlab-ctl start
#啓動gitlab就能看到熟悉的中文啦!
3、安裝過程當中可能會遇到的錯誤.net
gitlab-ctl start
code
gitlab-ctl reconfigure
blog
#這個錯誤飽受詬病,在啓動gitlab的時候執行reconfigure以後就能夠了。
錯誤以下:
[root@gitlab ]#patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < v10.8.4-zh.diff
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/app/assets/javascripts/awards_handler.js b/app/assets/javascripts/awards_handler.js
|index 976d32a..7967edb 100644
|--- a/app/assets/javascripts/awards_handler.js
|+++ b/app/assets/javascripts/awards_handler.js
--------------------------
File to patch:
#這是由於補丁中有一些較新的文件,可是咱們安裝的gitlab並無這個文件存在
#因此解決方法就是:跳過!!!
#跳過!!!
#跳過!!!
#跳過!!!
#出現這個錯誤時,一直按着回車跳過就好了!!!!
參考:
http://blog.51cto.com/bigboss/2129284
https://cloud.tencent.com/developer/article/1182722