部署自己的gitlab服务器

一、安装依赖环境,下载gitlab的rpm包,并且安装

yum install curl policycoreutils-python openssh-server postfix wget -y
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.2.3-ce.0.el7.x86_64.rpm rpm -ivh gitlab-ce-10.2.3-ce.0.el7.x86_64.rpm

二、配置gitlab服务

需要修改配置文件,换成你自己的服务器地址就好

vim /etc/gitlab/gitlab.rb

external_url 'http://10.0.0.191'

四、初始化gitlab,重新加载配置文件

# 注意,当修改了gitlab配置文件,就得reconfigure

[root@web1134 ~]# gitlab-ctl reconfigure
[root@web1134 ~]# gitlab-ctl restart
 

五,gitlab文件夹相关

/etc/gitlab/gitlab.rb          #gitlab配置文件
/opt/gitlab                    #gitlab的程序安装目录
/var/opt/gitlab                #gitlab目录数据目录
/var/opt/gitlab/git-data       #存放仓库数据
gitlab-ctl reconfigure         #重新加载配置
gitlab-ctl status              #查看当前gitlab所有服务运行状态
gitlab-ctl stop                #停止gitlab服务
gitlab-ctl stop nginx          #单独停止某个服务
gitlab-ctl tail                #查看所有服务的日志

Gitlab的服务构成:
nginx:                 静态web服务器
gitlab-workhorse        轻量级反向代理服务器
logrotate              日志文件管理工具
postgresql             数据库
redis                  缓存数据库
sidekiq                用于在后台执行队列任务(异步执行)

六,汉化

1、下载汉化补丁
[root@gitlab ~]# git clone https://gitlab.com/xhang/gitlab.git
[root@gitlab ~]# cd gitlab    
2、查看全部分支版本
[root@gitlab ~]# git branch -a
3、对比版本、生成补丁包
[root@gitlab ~]# git diff remotes/origin/10-0-stable remotes/origin/10-0-stable-zh > /tmp/10.0.0-zh.diff
4、停止服务器
[root@gitlab ~]# gitlab-ctl stop
5、打补丁
[root@gitlab ~]# patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < /tmp/10.0.0-zh.diff
6、启动和重新配置
[root@gitlab ~]# gitlab-ctl start
[root@gitlab ~]# gitlab-ctl reconfigure


https://www.cnblogs.com/zhujingzhi/p/9703457.html

https://www.cnblogs.com/yanjieli/p/10605381.html

原文地址:https://www.cnblogs.com/fengfengyang/p/15139685.html