Giter Site home page Giter Site logo

gitlab-setup-guide's Introduction

GitLab安装指南

说明

前几天新安装了GitLab-11.3.0,这个版本已经支持中文了,所以安装后面的新版本的时候已经不需要汉化了。

本指南仅指导用户在CentOS 7下进行GitLab的安装及汉化,其他操作系统下的程序安装请前往GitLab官网寻求指导,安装完成回来进行【手动汉化】步骤。

目录

[TOC]

安装英文原版

安装并配置必要的依赖

CentOS 7RedHat / Oracle / Scientific Linux 7)上,用以下命令在系统防火墙中打开HTTP和SSH访问 。

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

接下来,安装Postfix邮件发送通知。 如果您想使用其他方式发送电子邮件,请跳过此步骤并在安装GitLab后配置外部SMTP服务器。

sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix

在Postfix安装期间,可能会出现一个配置屏幕。 选择“Internet Site”并按回车。 使用您服务器的外部DNS “mail name”,然后按回车。 如果出现其他屏幕,请继续按回车键以接受默认值。

添加GitLab软件包储存库并安装软件包

添加GitLab软件包库。

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash

接下来,安装GitLab软件包。 将http://gitlab.example.com更改为您要访问您的GitLab实例的URL。 安装将自动配置并启动该URL的GitLab。 HTTPS安装后需要额外的配置。

sudo EXTERNAL_URL="http://gitlab.example.com" yum install -y gitlab-ee

浏览主机并登陆

在第一次访问时,您将被重定向到密码重置界面。初始默认管理员帐户root的密码,您将被重定向回登录界面。使用root登录。

更详细的内容,请参阅安装配置详细说明

手动汉化

本汉化演示gitlab-ee-10.4.2版本的汉化,其他版本汉化可以举一反三。

停止gitlab服务

gitlab-ctl stop

查看版本

cat /opt/gitlab/embedded/service/gitlab-rails/VERSION
10.4.2-ee

克隆获取汉化版本库

如果你安装的是gitlab-10.4.2-ee版本,那么恭喜你,你可以下载本安装指南根目录下的gitlab-10.4.2-zh.diff文件放到/tmp目录下,跳过三步,直接进行【安装patch并将差异变更到gitlab-rails】步骤。

cd /root
git clone https://gitlab.com/xhang/gitlab.git v10.4.2-zh

查看该汉化补丁的版本

cat /root/v10.4.2-zh/VERSION
10.4.2

将版本差异导出临时文件

git diff v10.4.2 v10.4.2-zh >/tmp/10.4.2-zh.diff

安装patch并将差异变更到gitlab-rails

yum install patch -y
patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < /tmp/10.4.2-zh.diff

启动gitlab

gitlab-ctl start

重新配置gitlab

gitlab-ctl reconfigure

参考链接

Installation methods for GitLab

Centos7.x Gitlab10安装及汉化

gitlab-setup-guide's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.