1、准备操作系统CentOS 7
2、安装gitlab
#安装
yum install curl policycoreutils openssh-server openssh-clients postfix
curl -sS http://packages.gitlab.cc/install/gitlab-ce/script.rpm.sh | sudo bash
EXTERNAL_URL="http://gitlab.domain.com" yum install gitlab-ce
#更改数据目录
vim /etc/gitlab/gitlab.rb
git_data_dir "/data/gitlab"
#添加邮箱
vim /etc/gitlab/gitlab.rb
----------------------------------------------------------
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.139.com"
gitlab_rails['smtp_port'] = 25
gitlab_rails['smtp_user_name'] = "[email protected]"
gitlab_rails['smtp_password'] = "hu158168"
gitlab_rails['smtp_domain'] = "139.com"
gitlab_rails['smtp_authentication'] = :login
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['gitlab_email_from'] = "[email protected]"
user["git_user_email"] = "[email protected]"
----------------------------------------------------------
3、汉化
#下载汉化包
https://gitlab.com/xhang/gitlab/tree/10-5-stable-zh
cd gitlab
git tag
# 对比不同,这里比较的是tag,v9.2.6为英文原版,v9.2.6-zh为汉化版本。diff结果是汉化补丁。
git diff v10.5.2..v10.5.2-zh > /tmp/10.5.2.diff
# 应用汉化补丁
cd /opt/gitlab/embedded/service/gitlab-rails
git apply /tmp/9.2.6.diff
4、初始化
gitlab-ctl reconfigure
5、启动
gitlab-ctl start
参考博文:
https://www.jianshu.com/p/e7b83dd85f9c
https://www.jianshu.com/p/6606aed59a56
原文地址:http://blog.51cto.com/linux10000/2083879