• Linux搭建GitLab并汉化


    一、环境准备

    1.1 下载wget
    # yum install -y vim
    # yum install -y wget
    # cd /usr/local
    # wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/gitlab-ce-10.0.2-ce.0.el6.x86_64.rpm
    
    1.2 关闭防火墙
    # service iptables stop
    # chkconfig iptables off
    

    二、获取GitLab汉化包(要部署非汉化版,可以跳过这一块内容)

    2.1 安装Git
    # yum install -y git
    
    2.2 克隆获取汉化版本库
    # cd /usr/local
    # git clone https://gitlab.com/xhang/gitlab.git
    

    三、部署社区版GitLab

    3.1 安装GitLab的依赖项
    # yum -y install policycoreutils openssh-server openssh-clients postfix cronie policycoreutils-python
    
    3.2 启动postfix,并设置为开机启动
    # service postfix start
    # chkconfig postfix on
    
    3.3 安装rpm包
    # cd /usr/local
    # rpm -ivh gitlab-ce-10.0.2-ce.0.el6.x86_64.rpm
    
    3.4 修改配置文件gitlab.rb
    # vim /etc/gitlab/gitlab.rb
    

    将external_url变量的地址修改为gitlab所在centos的ip地址
    修改GitLab默认端口

    unicorn['port'] = '9092'
    
    2743275-a0a401f33c7b08e9.png
    因为修改了配置文件,故需要重新加载配置内容。
    # gitlab-ctl reconfigure
    # gitlab-ctl restart
    

    四、覆盖汉化包

    4.1 停止GitLab服务
    # gitlab-ctl stop
    
    4.2 比较汉化标签和原标签,导出 patch 用的 diff 文件到/root下
    # cd /usr/local/gitlab
    # git diff v10.0.2 v10.0.2-zh > ../10.0.2-zh.diff
    
    4.3 将10.0.2-zh.diff作为补丁更新到GitLab中
    # cd /usr/local
    # yum install patch -y
    # patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < 10.0.2-zh.diff
    Tips:重启GitLab
    # gitlab-ctl reconfigure
    # gitlab-ctl restart
    
  • 相关阅读:
    5.21动态生成dll
    xtype:"combo" 动态加载
    用javascript 禁止右键,禁止复制,禁止粘贴
    页面正在载入(js代码)
    Ext.data.Store
    转 C#生成JSON数据格式的函数
    .Net 3.5环境下常用数组性能测试
    Lucene.Net 2.3.1开发介绍 —— 二、分词(六)
    Lucene.Net 2.3.1开发介绍 —— 三、索引(三)
    Lucene.Net 2.3.1开发介绍 —— 三、索引(二)
  • 原文地址:https://www.cnblogs.com/zhousiwei/p/10625665.html
Copyright © 2020-2023  润新知