Gitlab部署及汉化操作

一、简介

GitLab是一个利用 Ruby on Rails 开发的开源应用程序,实现一个自托管的Git项目仓库,可通过Web界面进行访问公开的或者私人项目。
GitLab拥有与Github类似的功能,能够浏览源代码,管理缺陷和注释。可以管理团队对仓库的访问,它非常易于浏览提交过的版本并提供一个文件历史库。它还提供一个代码片段收集功能可以轻松实现代码复用,便于日后有需要的时候进行查找。

二、基础环境准备  

 2.1 安装依赖包

如想使用Postfix来发送邮件,在安装期间请选择’Internet Site’. 您也可以用sendmai或者 配置SMTP服务 并 使用SMTP发送邮件.在 Centos 6 系统上, 下面的命令将在系统防火墙里面开放HTTP和SSH端口. 
[root@db01 ~]# yum install curl policycoreutils openssh-server openssh-clients postfix
[root@db01 ~]# /etc/init.d/postfix   start

2.2 添加GitLab仓库  

[root@ db01 ~]# curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
[root@ db01 ~]# yum install -y gitlab-ce 

2.3 可更换国内源

[root@linux-node2 ~]# vim /etc/yum.repos.d/gitlab-ce.repo
[gitlab-ce]
name=gitlab-ce
baseurl=http://mirrors.tuna.tsinghua.e ... m/el7
repo_gpgcheck=0
gpgcheck=0
enabled=1
gpgkey=https://packages.gitlab.com/gpg.key
[root@linux-node2 ~]# yum makecache
[root@linux-node2 ~]# yum install gitlab-ce 

2.4配置并启动gitlab-ce

#注意:在配置gitlab之前保证80端口没有被占用
[root@db01 ~]# gitlab-ctl reconfigure 

2.5 检查状态

[root@db01 src]# gitlab-ctl status
run: gitaly: (pid 23978) 37s; run: log: (pid 23342) 134s
run: gitlab-monitor: (pid 23998) 37s; run: log: (pid 23576) 122s
run: gitlab-workhorse: (pid 23958) 38s; run: log: (pid 23067) 152s
run: logrotate: (pid 23245) 140s; run: log: (pid 23244) 140s
run: nginx: (pid 23156) 146s; run: log: (pid 23155) 146s
run: node-exporter: (pid 23518) 128s; run: log: (pid 23517) 128s
run: postgres-exporter: (pid 24042) 34s; run: log: (pid 23757) 104s
run: postgresql: (pid 22636) 220s; run: log: (pid 22635) 220s
run: prometheus: (pid 24021) 35s; run: log: (pid 23688) 110s
run: redis: (pid 22503) 226s; run: log: (pid 22502) 226s
run: redis-exporter: (pid 23632) 116s; run: log: (pid 23631) 116s
run: sidekiq: (pid 22998) 158s; run: log: (pid 22997) 158s
run: unicorn: (pid 22930) 164s; run: log: (pid 22929) 164s
[root@db01 src]#
gitlab-ctl status

2.6 管理gitlab

 ifconfig eth0|awk -F '[ :]+' 'NR==2{print $4}'
# 获取网卡地址

 

猜你喜欢

转载自www.cnblogs.com/supery007/p/9053774.html