一、下载镜像
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/gitlab-ce-10.0.0-ce.0.el6.x86_64.rpm
二、安装gitlab
安装依赖包
yum install -y curl policycoreutils-python openssh-server
systemctl enable sshd
systemctl start sshd
yum install -y postfix
------------------------------------------------------
编辑配置文件
vim /etc/postfix/main.cf
修改处:
inet_protocols = ipv4 # 注:ipv4要小写
------------------------------------------------------
systemctl enable postfix
systemctl start postfix
rpm -ivh gitlab-ce-10.0.0-ce.0.el6.x86_64.rpm
三、编辑gatlab配置文件
vim /etc/gitlab/gitlab.rb
更改选项:external_url
external_url=‘你的域名’
四、初始化gatlib配置文件
sudo gitlab-ctl reconfigure
五、下载汉化包
# 检查安装包版本信息,我的是10.0.0
cat gitlab/VERSION
yum install -y git
git clone https://gitlab.com/xhang/gitlab.git
# 进入 gitlab汉化包
cd gitlab
# 生成文件 ,注:保存在上一级目录中
git diff v10.0.0 v10.0.0-zh > ../10.0.0-zh.diff
cd .. # 返回上一级目录
# 打上汉化补丁
patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < 10.0.0-zh.diff
# 重新部署配置文件
gitlab-ctl reconfigure
# 启动
gitlab-ctl start
完成!