Centos7 安装并汉化GitLab

一. 介绍:

GitLab是由GitLabInc.开发,具有wiki和issue跟踪功能。使用Git作为代码管理工具,并在此基础上搭建起来的web服务。它是由乌克兰程序员DmitriyZaporozhets和ValerySizov开发,它使用Ruby语言写成。后来,一些部分用Go语言重写。你可以把它理解为私人版的github.

二. 安装GitLab

1. 安装相关依赖
yum -y install policycoreutils openssh-server openssh-clients postfix
2. 安装git
yum install git
3. 启动ssh服务
#启动ssh服务,设置开机自启
systemctl enable sshd && sudo systemctl start sshd
4. 启动postfix
#启动postfix并设置为开机自启
systemctl enable postfix && systemctl start postfix
5. 开放防火墙
#开放ssh以及http服务
firewall-cmd --add-service=ssh --permanent
firewall-cmd --add-service=http --permanent
#重新加载防火墙列表
firewall-cmd --reload

如果防火墙处于关闭状态就不需要做以上配置.

7. 下载gitlab包
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/gitlab-ce-12.3.5-ce.0.el6.x86_64.rpm
8. 安装:
rpm -i gitlab-ce-12.3.5-ce.0.el6.x86_64.rpm
9. 修改gitlab配置
vi /etc/gitlab/gitlab.rb
10. 修改gitlab访问地址和端口
#修改访问地址
external_url 'http://{ip}:82'
#修改端口
nginx['listen_port'] = 82
11. 重载配置及启动gitlab
gitlab-ctl reconfigure
gitlab-ctl restart
12. 把端口添加到防火墙
firewall-cmd --zone=public --add-port=82/tcp --permanent
firewall-cmd --reload

如果防火墙处于关闭状态就不需要做以上配置.

13. 访问测试:

在这里插入图片描述

第一次登陆需要修改密码,修改密码后登陆:
在这里插入图片描述

三. 汉化:

1. 下载汉化包:

下载最新的汉化包:

git clone https://gitlab.com/xhang/gitlab.git

如果是要下载老版本的汉化包,需要加上老版本的分支,比如,想下载10.0.2,可以运行如下语句:

git clone https://gitlab.com/xhang/gitlab.git -b v10.0.2-zh

查看分支列表:
在这里插入图片描述

或者你可以使用下面的语句,前提是你需要知道下载地址:

wget https://gitlab.com/xhang/gitlab/-/archive/12-3-stable-zh/gitlab-12-3-stable-zh.tar.gz

访问https://gitlab.com/xhang/gitlab/-/tree/12-3-stable-zh获取对应的下载地址
在这里插入图片描述

2. 停止gitlab
gitlab-ctl stop
3. 修改系统指令
vi ~/.bashrc
将下面的内容注释掉,不然一会覆盖文件的时候,需要一直确认.
#alias cp='cp -i’

如图:
在这里插入图片描述
注释后记得执行:

#重启以包证生效
reboot
4. 安装汉化包:
 cp -rf gitlab-12-3-stable-zh/* /opt/gitlab/embedded/service/gitlab-rails/
5. 重载配置及启动gitlab
gitlab-ctl reconfigure
gitlab-ctl restart
6. 访问测试

在这里插入图片描述

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值