Yum一键安装GitLab

                               Yum一键安装GitLab(CentOS7.x)

1.实验环境

[root@gitlab ~]#  cat  /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)

官网安装指南:下载安装_极狐GitLab - 极狐GitLab 官方网站

2.添加gitlab的yum源仓库

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

3.安装gitlab

[root@gitlab ~]#  yum  -y  install  gitlab-ce

PS:  gitlab-ce 是社区版,免费的;gitlab-ee 是企业版

4.配置gitlab,设置配置文件/etc/gitlab/gitlab.rb 中的 external_url

如果更改默认端口808001(注意不要修改为8080否则会和默认的unicorn['port'] = 8080冲突),需要修改配置文件(1)和(2):

(1)gitlab配置文件 /etc/gitlab/gitlab.rb

   external_url 'http://192.168.33.66' -----> external_url 'http://192.168.33.66:8001',如下图所示:

(2)nginx配置文件 /var/opt/gitlab/nginx/conf/gitlab-http.conf

5.重载配置生效,然后重启服务

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

6.访问主页

  http://192.168.33.66:8001

用户名root,首次登陆需设定密码,而且密码至少8位

  • 1
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值