码迷,mamicode.com
首页 > 其他好文 > 详细

CentOS7.4安装Gitlab10.5.1及汉化

时间:2018-03-19 17:38:42      阅读:117      评论:0      收藏:0      [点我收藏+]

标签:安装Gitlab10.5.1及汉化

1、添加gitlab源

vi /etc/yum.repos.d/gitlab-ce.repo

[gitlab-ce]
name=gitlab-ce
baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever
gpgcheck=0
enabled=1

[gitlab-ce]
name=gitlab-ce
baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever
gpgcheck=0
enabled=1
2、安装gitlab

yum -y install openssh-server cronie git wget patch gitlab-ce-10.5.1
3、初始化gitlab

gitlab-ctl reconfigure
在卸载gitlab然后再次安装执行sudo gitlab-ctl reconfigure的时候往往会出现:ruby_block[supervise_redis_sleep] action run,会一直卡无法往下进行!

解决方案:

1、按住CTRL+C强制结束;

2、运行:sudo systemctl restart gitlab-runsvdir;

3、再次执行:sudo gitlab-ctl reconfigure

PS:可以在/etc/gitblab/gitlab.rb修改external_url,改成自己的url

4、查看服务

gitlab-ctl status
5、重启、停止或启动服务

gitlab-ctl restart/stop/start
安装完成,可以通过浏览器访问IP测试(如访问不了,请检查iptables、selinux)

http://IP

gitlab汉化

Gitlab中文社区版地址:https://gitlab.com/xhang/gitlab

1、克隆版本库(时间会很长,可以考虑挂代理,或者用自己的海外服务器中转下)

cd /usr/src/
git clone https://gitlab.com/xhang/gitlab.git
2、确定当前Gitlab版本

cat /opt/gitlab/embedded/service/gitlab-rails/VERSION
3、比较原标签和汉化标签,导出patch用的diff文件

cd gitlab
git diff v10.5.1 v10.5.1-zh> ../10.5.1-zh.diff
4、先停止gitlab

gitlab-ctl stop
5、上传10.5.1-zh.diff文件到服务器

patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < ../10.5.1-zh.diff
6、然后启动gitlab

gitlab-ctl start
此时访问http://IP就是全中文页面了(启动后马上打开页面可能会显示502,稍等几秒刷新就好了)

CentOS7.4安装Gitlab10.5.1及汉化

标签:安装Gitlab10.5.1及汉化

原文地址:http://blog.51cto.com/10158955/2088577

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!