操作系统:centos7.6 gitlab版本:11.1.4
# 安装gitlab-ce-11.1.4
rpm -Uvh https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.1.4-ce.0.el7.x86_64.rpm
vim /etc/gitlab/gitlab.rb
external_url 'http://192.168.1.100'
cd /data
git clone https://gitlab.com/xhang/gitlab.git
cat gitlab/VERSION
11.9.6 # 高版本兼容低版本
gitlab-ctl stop
cd /data/gitlab
# 指定版本比较汉化标签和原标签并导出patch用的diff文件
git diff v11.1.4 v11.1.4-zh > ../11.1.4-zh.diff
patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < ../11.1.4-zh.diff
# 一路回车
注:patch提示"command not found"的话,直接yum install patch就好。
gitlab-ctl reconfigure
gitlab-ctl restart
稍等片刻(会有短暂的502),就可以看到久违的中文了。