Git服务器搭建过程

Git服务器搭建过程
作者:家辉  日期:2018年3月16日 CSDN博客: http://blog.csdn.net/gobitan
摘要:本文记录了Gitlab服务器的搭建过程,记录下来备用。安装的操作系统为CentOS7.

第一部分:安装Gitlab
注意:建议用root用户安装,其他用户sudo因为权限问题容易出错
安装依赖包
# yum -y install curl policycoreutils postfix

启动邮件服务
# sudo systemctl start postfix

开启开机自启动
#sudo systemctl enable postfix

添加安装源

安装gitlab社区版gitlab-ce
# sudo yum -y install gitlab-ce
注:当前版本 10.5.3-ce.0.el7

第二部分:配置Gitlab
修改配置
sudo vi /etc/gitlab/gitlab.rb

修改#external_url ' http://gitlab.example.com'为:
external_url 'http://172.27.2.1xx'
注意:172.27.2.1xx为你的IP地址,需要修改。

修改默认端口
nginx['listen_port'] = 18080

然后重启
# gitlab-ctl reconfigure

然后已经可以访问了:http://172.27.2.1xx:18080,第一次要修改root用户的密码.

禁止用户注册
http://172.27.2.1xx:18080/admin/application_settings
在"Sign-up Restrictions"部分,去掉" Sign-up enabled"的打钩,然后保存。

停止gitlab
gitlab-ctl stop

参考资料:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

gobitan

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值