gitlab中文版安装

安装gitlab依赖

yum install -y curl policycoreutils-python openssh-server

下载gitlab,rpm包

#下载12.3.5版本(汉化包也是12.3.5,两个要一样)
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-12.3.5-ce.0.el7.x86_64.rpm
#安装gitlab
rpm -ivh gitlab-ce-12.3.5-ce.0.el7.x86_64.rpm

修改配置文件

vim /etc/gitlab/gitlab.rb
external_url修改为你的ip或域名

打补丁方式汉化

git clone https://gitlab.com/xhang/gitlab.git
cd gitlab
gitlab_version=$(sudo cat /opt/gitlab/embedded/service/gitlab-rails/VERSION) && echo $gitlab_version
git diff v${gitlab_version} v${gitlab_version}-zh > ../${gitlab_version}-zh.diff
cd ..
patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < ${gitlab_version}-zh.dif

启动服务

gitlab-ctl reconfigure
gitlab-ctl restart

Comments Closed.