gitlab安装部署并汉化

  • 下载RPM包

先下载gitlab的RPM安装包,下载地址如下:
https://about.gitlab.com/install/#centos6
https://packages.gitlab.com/gitlab/gitlab-ce
选择你需要下载的版本

  • 安装依赖

  • yum install curl openssh-server openssh-clients postfix cronie policycoreutils-python -y

  • 创建安装目录

  • mkdir -p /data/app
    cd /data/app/
    把下载好了的包拖到此处,然后安装
    rpm -ivh gitlab-ce-11.5.0-ce.0.el6.x86_64.rpm
    vim /etc/gitlab/gitlab.rb 修改配置文件
    [root@localhost ~]# egrep -v ‘^$|\s*#’ /etc/gitlab/gitlab.rb
    external_url ‘http://10.80.2.110
    nginx[‘enable’] = true
    nginx[‘client_max_body_size’] = ‘250m’
    nginx[‘redirect_http_to_https’] = false
    nginx[‘redirect_http_to_https_port’] = 80

    gitlab-ctl reconfigure
    启动gitlab
    gitlab-ctl start
    查看端口netstat -ntlp 查看是否开启端口
    tcp 0 0 127.0.0.1:9121 0.0.0.0:* LISTEN 1179/redis_exporter
    tcp 0 0 127.0.0.1:9090 0.0.0.0:* LISTEN 1172/prometheus
    tcp 0 0 127.0.0.1:9187 0.0.0.0:* LISTEN 1167/postgres_expor
    tcp 0 0 127.0.0.1:9093 0.0.0.0:* LISTEN 1623/alertmanager
    tcp 0 0 127.0.0.1:9100 0.0.0.0:* LISTEN 1176/node_exporter
    tcp 0 0 127.0.0.1:9229 0.0.0.0:* LISTEN 1165/gitlab-workhor
    tcp 0 0 0.0.0.0:8060 0.0.0.0:* LISTEN 1177/nginx
    默认的nginx是否启动
    git --version 查看git版本信息

  • 汉化
    git clone https://gitlab.com/xhang/gitlab.git
    克隆汉化仓库
    在汉化前停止服务
    gitlab-ctl stop
    查看gitlab版本信息
    [root@localhost ~]# head -1 /opt/gitlab/version-manifest.txt
    gitlab-ce 11.5.0
    生成汉化包到本地
    git diff v11.5.0 v11.5.0-zh > …/v11.5.0-zh.diff
    patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < v11.5.0-zh.diff 一路回车
    汉化包导入
    gitlab-ctl reconfigure初始化配置
    gitlab-ctl start 启动服务
    然后打开浏览器查看
    安装成功

猜你喜欢

转载自blog.csdn.net/weixin_43231324/article/details/86003730