当前位置:   article > 正文

GitLab汉化版搭建_gitlab中文版搭建

gitlab中文版搭建

1 环境安装

yum -y install lokkit
yum -y install curl openssh-server openssh-clients postfix cronie 
service postfix start 
chkconfig postfix on 
lokkit -s http -s ssh
  • 1
  • 2
  • 3
  • 4
  • 5

2 使用rpm包安装

rpm -ivh https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.4.4-ce.0.el7.x86_64.rpme
  • 1

在这里插入图片描述

3 修改配置

vim  /etc/gitlab/gitlab.rb

#访问url
external_url 'http://192.168.38.45'

#防止吃大量内存
unicorn['worker_processes'] = 2
postgresql['max_worker_processes'] = 2
nginx['worker_processes'] = 2
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

在这里插入图片描述

4 重置并启动GitLab

#输入命令,自动配置
gitlab-ctl reconfigure
#查看状态
gitlab-ctl status
#重启
gitlab-ctl restart
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

在这里插入图片描述

5 访问url

#设置新密码
http://192.168.38.45/
  • 1
  • 2

在这里插入图片描述

6 汉化

6.1 安装git

yum -y install git
#查看版本
git version
  • 1
  • 2
  • 3

在这里插入图片描述

6.2 打汉化补丁

git clone https://gitlab.com/xhang/gitlab.git
cd gitlab    
#查看版本
cat /opt/gitlab/embedded/service/gitlab-rails/VERSION
#查看全部分支
git branch -a
#生成补丁包
git diff remotes/origin/10-4-stable remotes/origin/10-4-stable-zh > /tmp/10.4.4-zh.diff
#停止服务器
gitlab-ctl stop
#打补丁
patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < /tmp/10.4.4-zh.diff
#启动和重新配置
gitlab-ctl start
gitlab-ctl reconfigure
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15

6.3 再次访问

在这里插入图片描述

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号