一、基础环境准备

1.安装依赖包

 [root@gitlab-server ~]#yum install curl policycoreutils openssh-server openssh-clients postfix wget git patch -y
[root@gitlab-server ~]# systemctl start postfix

2.配置yum源(由于网络问题,国内用户,建议使用清华大学的镜像源进行安装)

[root@gitlab-server ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
[root@gitlab-server ~]# wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo
[root@gitlab-server ~]#vim /etc/yum.repos.d/gitlab-ce.repo
[gitlab-ce]
name=gitlab-ce
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
repo_gpgcheck=
gpgcheck=
enabled=
gpgkey=https://packages.gitlab.com/gpg.key
[root@gitlab-server ~]# yum clean all && yum makecache

二、获取gitlab及汉化包

[root@gitlab-server ~]# wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.6.4-ce.0.el7.x86_64.rpm   #直接下载rpm包,因为测试发现无论是国外还是国内源速度都很感人
[root@gitlab-server ~]# git clone https://gitlab.com/xhang/gitlab.git -b v10.6.4-zh #下载汉化包,汉化包和gitlab对应,如果是最新的,则不需要指定版本

三、安装gitlab

[root@gitlab-server ~]# yum localinstall gitlab-ce-10.6.-ce..el7.x86_64.rpm -y
[root@gitlab-server ~]# vim /etc/gitlab/gitlab.rb
external_url 'http://192.168.0.104' #修改为本机IP或者域名,重要
[root@gitlab-server ~]# gitlab-ctl reconfigure #配置并启动gitlab-ce
[root@gitlab-server ~]# gitlab-ctl status
[root@gitlab-server ~]# netstat -tnlp #查看端口,特别是80和8080,避免被其他程序占用

打开Web界面,首先需要配置管理员密码,密码不少于8位

修改完成后,刷新页面出现登录和注册的页面,使用root用户和密码登录(生产环境应当关闭页面的注册功能)

登录后,语言为英文,不习惯可以使用汉化包进行汉化

四、安装汉化包

[root@gitlab-server ~]# gitlab-ctl stop #停止服务,否则会出错
[root@gitlab-server ~]# cd /root/gitlab
[root@gitlab-server gitlab]# git diff v10.6.4 v10.6.4-zh > ../10.6.-zh.diff #比较汉化标签和原标签,导出 patch 用的 diff 文件到/root下
[root@gitlab-server gitlab]# cd
[root@gitlab-server ~]# patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < 10.6.-zh.diff #将10.6.4-zh.diff作为补丁更新到gitlab中
[root@gitlab-server ~]# gitlab-ctl reconfigure #重新配置gitlab
[root@gitlab-server ~]# gitlab-ctl start

刷新Web页面,查看是否汉化成功

为了安全应当关闭用户注册的功能:

效果

只有登录界面啦!

其他:

生产环境gitlab的软硬件要求可以参考这篇文章:http://www.cnblogs.com/gnool/p/6128546.html

对git命令如果不是很熟悉,可以参照廖雪峰大神的文档 https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000

centos7安装gitlab并汉化的更多相关文章

  1. CentOS7安装GitLab、汉化及使用

    同步首发:http://www.yuanrengu.com/index.php/20171112.html 一.GitLab简介 GitLab是利用Ruby On Rails开发的一个开源版本管理系统 ...

  2. CentOS7安装GitLab、汉化、邮箱配置及使用

    同步首发:http://www.yuanrengu.com/index.php/20171112.html 一.GitLab简介 GitLab是利用Ruby On Rails开发的一个开源版本管理系统 ...

  3. CentOS7安装GitLab、汉化、邮箱配置及使用(转载)

    同步首发: https://www.cnblogs.com/heyonggang/p/7778203.html http://www.yuanrengu.com/index.php/20171112. ...

  4. centos安装gitlab及汉化

    GitLab 是一个用于仓库管理系统的开源项目,使用Git作为代码管理工具,并在此基础上搭建起来的web服务.今天,就记录一下centos部署gitlab及其汉化的操作方法. 1.下载安装 下载地址: ...

  5. CentOS7.5安装GitLab及汉化

    一.GitLab英文版安装 1.下载gitlab安装包,然后安装 wget --content-disposition https://packages.gitlab.com/gitlab/gitla ...

  6. CentOS 7安装GitLab、汉化、配置邮件发送

    1.更换国内yum源 1.1 备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 1.2 ...

  7. 安装gitlab并汉化

    简介: GitLab是一个利用Ruby on Rails开发的开源应用程序,实现一个自托管的Git项目仓库,可通过Web界面进行访问公开的或者私人项目. 它拥有与GitHub类似的功能,能够浏览源代码 ...

  8. 快速安装 GitLab 并汉化

    转载:http://www.jianshu.com/p/7a0d6917e009

  9. CentOs7安装gitlab(转!)

    沧浪之水清兮,可以濯吾缨; 沧浪之水浊兮,可以濯吾足.                                                                         ...

随机推荐

  1. python之路---10 *args **kwargs 命名空间 作用域 函数的嵌套

    二十八.函数进阶 1.   "*"  和  "**" ① 在形参位置时   都是聚合的作用 *args    位置参数→元组 **kwargs   关键字参数→ ...

  2. 编写python扩展

    代码: #include <Python.h> static PyObject * spam_system(PyObject *self, PyObject *args) { const ...

  3. AES 加解密 Java实现

    package com.smt.cipher.symmetry; import java.nio.charset.Charset; import java.security.SecureRandom; ...

  4. Java JDBC基本用法

    准备oracle驱动包:maven添加oracle jdbc依赖 pom.xml <!-- oracle jdbc驱动 --> <dependency> <groupId ...

  5. elasticsearch 聚合函数 max double精度损失bug

    测试样例数据{ "size" : 0, "query" : { "bool" : { "must" : { " ...

  6. Tensorflow之基于MNIST手写识别的入门介绍

    Tensorflow是当下AI热潮下,最为受欢迎的开源框架.无论是从Github上的fork数量还是star数量,还是从支持的语音,开发资料,社区活跃度等多方面,他当之为superstar. 在前面介 ...

  7. dragino2 ar9331将LED管脚当做普通gpio使用

    1. 将gpio13和gpio17也当作普通gpio使用,修改 target/linux/ar71xx/files/arch/mips/ath79/mach-dragino2.c文件如下 /* * D ...

  8. 前端实现在线预览pdf、word、xls、ppt等文件

    最近在做一个公司的资源管理系统,一些知识小记一下. 1.前端实现pdf文件在线预览功能 方式一.pdf文件理论上可以在浏览器直接打开预览但是需要打开新页面.在仅仅是预览pdf文件且UI要求不高的情况下 ...

  9. thinkPHP 3.2.3操作MongoDB指南

    今天使用thinkPHP操作MongoDB发现跟用MYSQL有很多不同的地方,在这里特别跟大家分享下. 暂时没用thinkPHP5一直还在用thinkPHP3.2.3觉得挺好用,MongoDB版本2和 ...

  10. python show slave status

    #!/usr/bin/env python import MySQLdbimport contextlib @contextlib.contextmanagerdef mysql(Host,Port, ...