美文网首页
gitlab 安装gitlab并汉化 中文社区最新版 12.3.

gitlab 安装gitlab并汉化 中文社区最新版 12.3.

作者: 归隐小赵 | 来源:发表于2020-11-03 17:07 被阅读0次

系统:centos7.6
所需配置和环境安装

#关闭防火墙
systemctl stop firewalld.service
systemctl disable firewalld.service 
#安装git,拓展
yum install -y git curl policycoreutils-python openssh-server

#创建目录并进入
mkdir gitlab
cd gitlab

#前往清华园获取下载地址(默认12.3.5 ep17) ([https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/](https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/))

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-12.3.5-ce.0.el7.x86_64.rpm
#安装gitlab
rpm -ivh gitlab-ce-12.3.5-ce.0.el7.x86_64.rpm  
image.png

安装完成,配置rb文件

Thank you for installing GitLab!
GitLab was unable to detect a valid hostname for your instance.
Please configure a URL for your GitLab instance by setting `external_url`
configuration in /etc/gitlab/gitlab.rb file.
Then, you can start your GitLab instance by running the following command:
  sudo gitlab-ctl reconfigure

进入目录,配置

cd /etc/gitlab
ls -l
#url改为你的域名/ip
external_url 'http://xxx.com:8080' #域名
unicorn['port']=8085  #gitlab默认端口
nginx['listen_port']=8080 #git端口
git_data_dirs({ "default" => { "path" => "/www/gitlab-data" } }) #指定源码挂载目录
gitlab_rails['manage_backup_path'] = true
gitlab_rails['backup_path'] = "/gitlab_backup" #指定备份目录
gitlab-ctl reconfigure    #重新加载配置文件

安装完成,请求URL,配置root密码
http://xxx.com:8080(配置文件指定了8080端口)

image.png
配置汉化包
mkdir /git_zh
cd git_zh
git clone https://gitlab.com/xhang/gitlab.git
cd gitlab 
git diff remotes/origin/12-3-stable remotes/origin/12-3-stable-zh > /tmp/12.3.5-zh.diff
gitlab-ctl stop
#一路回车即可
patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < /tmp/12.3.5-zh.diff

gitlab-ctl start
gitlab-ctl reconfigure

汉化完成


image.png

相关文章

网友评论

      本文标题:gitlab 安装gitlab并汉化 中文社区最新版 12.3.

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