centos7上安装gitlab,配置和汉化。

本文介绍如何部署GitLab社区版,包括安装依赖、配置防火墙、获取并安装rpm包等步骤,并提供汉化包的获取及应用教程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一  部署社区版gitlab

1.1 安装gitlab的依赖项

yum install curl openssh-server openssh-clients postfix cronie policycoreutils-python –y

1.2 启动postfix,并设置为开机启动 

systemctl start postfix
systemctl enable postfix
1.3 设置防火墙

firewall-cmd --add-service=http --permanent
firewall-cmd --reload
1.4 获取gitlab的rpm包

查看清华开源镜像站,有我需要的8.6.7的rpm包


获取rpm包 

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-8.6.7-ce.0.el7.x86_64.rpm
安装rpm包
rpm -ivh gitlab-ce-8.6.7-ce.0.el7.x86_64.rpm
1.5 修改配置文件gitlab.rb
vim /etc/gitlab/gitlab.rb


因为修改了配置文件,故需要重新加载配置内容。
gitlab-ctl reconfigure
gitlab-ctl restart

二、获取gitlab汉化包(要部署非汉化版,可以跳过这一块内容)

说明:gitlab中文社区版的项目,v7-v8.8是由Larry Li发起的“GitLab 中文社区版项目”(https://gitlab.com/larryli/gitlab),从 v8.9 之后,@xhang 开始继续该汉化项目(https://gitlab.com/xhang/gitlab)。

 2.1 安装git

yum install -y git

 

 2.2 克隆获取汉化版本库

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

  // 如果已经克隆过,则进行更新(第一次部署不用更新)

git fetch

 

2.3 查看该汉化补丁的版本

cat gitlab/VERSION

三、汉化

1,切换分支。这里centos7测试的是8.6.7版本,需要进行切换。

  1. cd gitlab-L-zh
  2. git checkout -b 8-6-zh origin/8-6-zh
  3. cp -r /opt/gitlab/embedded/service/gitlab-rails{,.ori}

3,汉化操作
首先停止gitlab:

  1. gitlab-ctl stop

汉化操作:

  1. yes|cp -rf ../gitlab-L-zh/* /opt/gitlab/embedded/service/gitlab-rails/

4,启动,查看效果

  1. gitlab-ctl start



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值