美文网首页
Centos7系统下配置Git服务器(3)---汉化版GitLa

Centos7系统下配置Git服务器(3)---汉化版GitLa

作者: 我是李小胖 | 来源:发表于2020-01-16 09:22 被阅读0次

1、安装Git,下载汉化版GitLab的安装包

(1)安装Git(其实可以跳过这步,CentOS自带了)

yum install -y git

(2)下载汉化版GitLab的安装包

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

image

2、查看汉化版GitLab安装包的版本,去GitLab网站上下载同版本的原版安装包

(1)查看汉化版GitLab的版本

cat gitlab/VERSION

image

(2)去GitLab网站上下载同版本的原版安装包
网站地址:https://packages.gitlab.com/gitlab

我们安装的是社区版,所以进入gitlab-ce

image

(3)安装wget

yum install -y wget

(4)依照gitlab网站上的提示,使用wget下载对应安装包

image
wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ee/packages/el/7/gitlab-ee-12.0.6-ee.0.el7.x86_64.rpm/download.rpm

image

3、安装必需依赖与原版GitLab

(1)安装必需依赖并设置防火墙

sudo yum install -y curl policycoreutils-python openssh-server

sudo systemctl enable sshd

sudo systemctl start sshd

sudo firewall-cmd --permanent --add-service=http

sudo systemctl reload firewalld

image

(2)非必要:安装Postfix(邮件通知以后靠他,当然也可以使用其他邮件服务器):

sudo yum install postfix

sudo systemctl enable postfix

sudo systemctl start postfix

(3)安装原版GitLab

rpm -i gitlab-ee-12.0.6-ee.0.el7.x86_64.rpm

image

(4)依据提示重新编译

gitlab-ctl reconfigure

image

4、生成diff并更新到原版GitLab中

(1)停止GitLab服务

gitlab-ctl stop

(2)切换目录,导出diff文件

cd /root/gitlab

git diff v12.0.6 v12.0.6-zh > ../12.0.6-zh.diff

(3)回到根目录,安装补丁并将生成的diff文件更新到原版GitLab

cd

yum install patch -y

patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < 12.0.6-zh.diff

一路回车,应该是跳过15个补丁……。就安装成功了……

(4)启动GitLab

gitlab-ctl start

(5)通过IP进入GitLab提供的访问页面

image

(6)安装完成后,打开页面的502错误
多等一会儿就好了,就是GitLab还没启来……

相关文章

网友评论

      本文标题:Centos7系统下配置Git服务器(3)---汉化版GitLa

      本文链接:https://www.haomeiwen.com/subject/haexzctx.html