RHEL7/CentOS7安装gitlab并汉化

环境CentOS7
本文为CentOS7安装gitlab并汉化文档,来自搭建整理,参考文档为:https://about.gitlab.com/install/

1.安装依赖包

yum install -y curl policycoreutils-python openssh-server postfix vim wget git patch

2.在系统防火墙中打开HTTP和HTTPS,设置SSH、邮件开机启动

systemctl restart firewalld
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
systemctl reload firewalld
systemctl enable sshd
systemctl start sshd
systemctl enable postfix
systemctl start postfix

3.下载gitlab/配置YUM源
用wget下载安装或者直接配置yum安装

# 用wget命令下载gitlab
wget https://mirror.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm
# 清华大学开源软件镜像站
vim /etc/yum.repos.d/gitlab.repo
[gitlab]
name=gitlab
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
repo_gpgcheck=0
gpgcheck=0
enabled=1
gpgkey=https://packages.gitlab.com/gpg.key

4.安装gitlab

yum clean all && yum makecache
# 安装gitlab
yum install -y gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm
vim /etc/gitlab/gitlab.rb
# external_url 'http://192.168.2.110'
# 重新配置gitlab
gitlab-ctl reconfigure
# 查看gitlab状态
gitlab-ctl status
# 查看端口
netstat -tnlp

5.中文汉化

# 查看gitlab版本
cat /opt/gitlab/embedded/service/gitlab-rails/VERSION
# 停止服务
gitlab-ctl stop
# 克隆获取汉化版本库,以下我在/home/目录执行的
git clone https://gitlab.com/xhang/gitlab.git -b v10.0.0-zh
# 查看汉化补丁的版本
cat gitlab/VERSION
cd gitlab/
# 比较汉化标签和原标签,导出patch用的diff文件到/home下
git diff v10.0.0 v10.0.0-zh > ../10.0.0-zh.diff 
cd ../
# 将10.0.0-zh.diff更新到gitlab中
patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < 10.0.0-zh.diff
# 重新配置gitlab
gitlab-ctl reconfigure
# 重启gitlab
gitlab-ctl restart

6.备注说明
汉化的时候,汉化补丁和gitlab版本尽量保持一致,第一次汉化版本不一致,导致汉化失败。

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值