美文网首页
CentOS 7安装GitLab-8.5.7 汉化

CentOS 7安装GitLab-8.5.7 汉化

作者: 子隆Charles | 来源:发表于2018-06-01 17:50 被阅读24次

自己在鼓捣GitLab时遇到很多坑,下面记录下过程,希望对需要的人有帮助。

参考:

快速安装 GitLab 并汉化

Gitlab gitlab-ce-8.16.4-ce 安装文档

centos7 部署 汉化版 gitlab 10.0.2

1.在root用户下执行

$: sudo yum installcurl openssh-serveropenssh-clients postfix cronie -y
$: sudo service postfixstart

这里可能会报错如下:

$: Job for postfix.service failed because the control process exited with error code. See "systemctl status postfix.service" and "journalctl -xe" for details.

解决方法:修改 /etc/postfix/main.cf的设置,然后重新执行上面的命令

inet_protocols = ipv4
inet_interfaces = all

$: sudo chkconfig postfixon
$: sudo lokkit -shttp-s ssh

这个错误 lokkit: command not found

$:yum -y install lokkit
$:sudo lokkit -s http -s ssh

2.添加Gitlab仓库,并安装在服务器上

版本说明: 本文使用的是国内镜像下载安装方式,比国外网站下载速度快;

CentOS (内核6.x)https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6
,选择需要的版本进行安装。
CentOS (内核7.x)https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7,选择需要的版本进行安装。


$:cd /usr/local/src
$:wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/gitlab-ce-8.5.7-ce.0.el7.x86_64.rpm
$:rpm -ivh gitlab-ce-8.5.7-ce.0.el7.x86_64.rpm

3.gitlab-ce设置

新建/etc/yum.repos.d/gitlab-ce.repo

$:vim/etc/yum.repos.d/gitlab-ce.repo// 添加如下内容

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

$:sudo yum makecache
$:sudo yum install gitlab-ce

4.创建gitlab.rb配置文件

$:sudo mkdir -p/etc/gitlab
$:sudo touch /etc/gitlab/gitlab.rb
$:sudo chmod 600 /etc/gitlab/gitlab.rb

5.添加web访问的IP地址

$: vim /etc/gitlab/gitlab.rb// 添加以下内容

external_url 'http://XXX.XXX.XXX.XXX' # 部署Gitlab的主机IP

6.启动Gitlab

$: sudo gitlab-ctl reconfigure

注意:每次修改完配置文件,都需要重新生效,执行sudo gitlab-ctl reconfigure

相关命令(供安装人员参考使用):

$: sudo gitlab-ctl start    # gitlab启动
$: sudo gitlab-ctl restart  # gitlab重启
$: sudo gitlab-ctl stop     # gitlab停止
$: sudo gitlab-ctl status   # gitlab状态

7.安装中文语言包(汉化)

以下汉化步骤参考此篇文章,首先确认当前安装版本

$: cat /opt/gitlab/embedded/service/gitlab-rails/VERSION

克隆 GitLab 源码仓库:

$: git clone https://gitlab.com/larryli/gitlab.git
#或 Gitcafe.com 镜像,速度更快
$: git clone https://gitcafe.com/larryli/gitlab.git

切换到gitlab汉化包所在的目录

$: cd /root/gitlab

比较汉化标签和原标签,导出diff 文件到/root下

$: git diff v8.5.7 v8.5.7-zhl > ../8.5.7-zh.diff

4.4 回到/root目录

$: cd

停止 gitlab

$: sudo gitlab-ctl stop

应用汉化补丁

$: cd /opt/gitlab/embedded/service/gitlab-rails
$: git apply /tmp/8.5.diff  

启动gitlab

$: sudo gitlab-ctl start

至此,汉化完毕。

相关文章

  • CentOS 7安装GitLab-8.5.7 汉化

    自己在鼓捣GitLab时遇到很多坑,下面记录下过程,希望对需要的人有帮助。 参考: 快速安装 GitLab 并汉化...

  • gitlab安装及汉化整理

    安装步骤 安装参照 gitlab官网 汉化指南 centos7安装步骤如下 安装配置依赖 下载安装gitlab 修...

  • centos下man命令汉化

    1 操作系统版本 centos7 2 步骤 安装方式:yum (1)查看安装包 (2)yum安装 (3)配置汉化命...

  • 二.zabbix4.0汉化和解决中文乱码

    前提条件: 完成CentOS7下LNMP部署zabbix4.0(yum安装) zabbix4.0汉化开始: 1.访...

  • 快速汉化RHEL7

    本文档给出快速汉化RHEL7的方法,此方法同样适用于CentOS7,做汉化操作前,请确保yum源正常。 汉化前: ...

  • 程序日记2018-05-03

    centos7 安装nginx和php7 centos7 安装nginx和php7 centos7系统安装php7...

  • yum安装nginx,mysql,php

    centos7 一、安装nginx 安装mysql(centos7) 安装php centos8 安装php74 ...

  • 2018-04-19

    Centos 7 安装 tomcat7, jdk,mysql,zookeeper Centos 安装jdk 安装...

  • docker容器安装

    一、centos7安装docker 使用 yum 安装(CentOS 7下) Docker 要求 CentOS 系...

  • FastDFS 集群

    Centos 7 安装 FastDFS CentOS 7 安装 Nginx FastDFS 和 Nginx 整合 ...

网友评论

      本文标题:CentOS 7安装GitLab-8.5.7 汉化

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