普通搭建请看:gitlab 搭建

一.gitlab搭建

1.添加GitLab镜像源并安装gitlab服务器

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm

2.安装gitlab 安装命令:安装过程需要些时间

rpm -i gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm

3.修改gitlab配置文件指定服务器ip和自定义端口:

vim  /etc/gitlab/gitlab.rb
external_url 'http://localhost:8099'
nginx['enable'] = false
gitlab_workhorse['listen_network'] = "tcp"
gitlab_workhorse['listen_addr'] = "127.0.0.1:8098" //这个端口号一会和Nginx代理的端口号要一致

4.汉化gitlab

安装git

yum install -y git

克隆获取汉化版本库

项目地址为:https://gitlab.com/xhang/gitlab
我的gitlab版本为10.5.1
git clone https://gitlab.com/xhang/gitlab.git -b v10.0.0-zh
想要其他版本的gitlab:
git clone https://gitlab.com/xhang/gitlab.git -b vX.X.X-zh即可

停止gitlab服务

gitlab-ctl stop

进入git下载的gitlab项目

cd gitlab 

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

git diff v10.0.0 v10.0.0-zh > ../10.0.0-zh.diff

回到/root目录

cd 

将10.0.0-zh.diff作为补丁更新到gitlab中

patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < 10.0.0-zh.diff

启动gitlab

gitlab-ctl reconfigure
gitlab-ctl start

二、nginx配置

vi /etc/nginx/conf/vhost/gitlab-http.conf
server {
listen 8099; #我的gitlab一般使用8099端口访问
server_name localhost; location / {
root html;
index index.html index.htm;
proxy_pass http://127.0.0.1:8098; #这里与前面设置过的端口一致
}
}
重启nginx
systemctl restart nginx
开机自启动gitlab
systemctl enable gitlab-runsvdir

输入地址:192.168.233.135:8099访问gitlab
进入后会提示添加密码
默认账号:root 或admin@example.com

参考:gitlab自带的Nginx与原Nginx冲突的解决方案

最新文章

  1. 11.Configure Many-to-Many(配置多对多关系)【Code-First系列】
  2. 使用 Productivity Power Tools 高级扩展 来帮助你提高 VS2012 的工作效率
  3. Web API应用架构在Winform混合框架中的应用(2)--自定义异常结果的处理
  4. Wrangle – 响应式的,触摸友好的多选插件
  5. ContentProvider总结
  6. Python webpy微信公众号开发之 回复图文消息
  7. Wps的ppt里 让图片按顺序出现 就是点击一下 出现一张照片
  8. [GIF] GIF Loop Coder Single Mode
  9. ORACLE添加作业
  10. 如何完全退出android应用程序
  11. 关于python27 中文编码
  12. [LeetCode]题解(python):146-LRU Cache
  13. 一个简单二叉树的C++实现(一)
  14. CSS 控制应为Html页面高度导致抖动的问题
  15. JavaScript 计算指定月份有多少天
  16. 解决winform窗体闪烁问题
  17. [ZOJ 4014] Pretty Matrix
  18. PIL: 建立一个GIF图
  19. Metadata获取的三种方式
  20. taro之React Native 端开发研究

热门文章

  1. MySQL全面瓦解2:常用命令和系统管理
  2. vue 在nginx下页面刷新出现404问题解决和在nginx下页面加载了js但是页面显示空白问题解决
  3. 惊呆了!Spring Boot 还能开启远程调试?
  4. Flink1.9.2源码编译和使用
  5. Git的介绍及使用
  6. Asp.Net Core学习笔记:入门篇
  7. 一些bug
  8. 【Kata Daily 190909】The Supermarket Queue(超市队列)
  9. 编码风格:Mvc模式下SSM环境,代码分层管理
  10. leetcode26:valid-palindrome