代码管理平台GITLAB

22.4 GITLAB

在讲完搭建GIT服务器之后,我们都知道这并不完美,只适用于开发人员较少的公司。所以寻求一种更好的解决方案,国内有CODING、码云等都可以作为选择,这样可以不用自己维护;另外一种比较好的方法就是搭建GITLAB服务器。

官方网站:https://about.gitlab.com/
安装文档:https://about.gitlab.com/installation/#centos-7 (针对的是企业版ee)

我们要使用的是社区版本ce,不管是哪个版本,都要求服务器内存不低于4G。


安装gitlab

  • 编辑repo文件:
# vim /etc/yum.repos.d/gitlab.repo
[gitlab-ce]
name=Gitlab CE Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/
gpgcheck=0
enabled=1
  • 安装gitlab:
# yum install -y gitlab-ce

# gitlab-ctl reconfigure				#自动配置gitlab

Running handlers:
Running handlers complete
Chef Client finished, 432/614 resources updated in 05 minutes 39 seconds
gitlab Reconfigured!

上面配置过程会花费一些时间,因为gitlab会将它启动所需要的服务全部配置好后打开。

# netstat -lntp

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:9100          0.0.0.0:*               LISTEN      4376/node_exporter  
tcp        0      0 127.0.0.1:9229          0.0.0.0:*               LISTEN      5000/gitlab-workhor 
tcp        0      0 127.0.0.1:9168          0.0.0.0:*               LISTEN      5043/ruby           
tcp        0      0 127.0.0.1:8080          0.0.0.0:*               LISTEN      3903/unicorn master 
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      4078/nginx: master  
tcp        0      0 127.0.0.1:8082          0.0.0.0:*               LISTEN      3949/sidekiq 5.1.3  
tcp        0      0 127.0.0.1:9236          0.0.0.0:*               LISTEN      5020/gitaly         
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1029/sshd           
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1394/master         
tcp        0      0 0.0.0.0:8060            0.0.0.0:*               LISTEN      4078/nginx: master  
tcp        0      0 127.0.0.1:9121          0.0.0.0:*               LISTEN      4503/redis_exporter 
tcp        0      0 127.0.0.1:9090          0.0.0.0:*               LISTEN      5053/prometheus     
tcp        0      0 127.0.0.1:9187          0.0.0.0:*               LISTEN      5098/postgres_expor 
tcp        0      0 127.0.0.1:9093          0.0.0.0:*               LISTEN      5069/alertmanager   
tcp6       0      0 ::1:9168                :::*                    LISTEN      5043/ruby           
tcp6       0      0 :::22                   :::*                    LISTEN      1029/sshd           
tcp6       0      0 ::1:25                  :::*                    LISTEN      1394/master         
tcp6       0      0 :::9094                 :::*                    LISTEN      5069/alertmanager   
tcp6       0      0 :::3306                 :::*                    LISTEN      1352/mysqld   
  • 查看gitlab状态:
# gitlab-ctl status				#查看gitlab服务状态

run: alertmanager: (pid 5069) 372s; run: log: (pid 5091) 371s
run: gitaly: (pid 5020) 374s; run: log: 
  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值