gitlab 简单搭建

第一步

安装电子邮件服务器

yum install curl policycoreutils openssh-server openssh-clients postfix  -y

service postfix start 

chkconfig postfix on

如果出现错误“Job for postfix.service failed because the control process exited with error code. See "systemctl status postfix.service...”

则修改 /etc/postfix/main.cf的设置

inet_protocols = ipv4

inet_interfaces = all  

第二步

关闭防火墙

iptables -F  #清空规则
systemctl stop firewalld
systemctl disable firewalld

第三步

安装gitlab-ce

# vim /etc/yum.repos.d/gitlab-ce.repo

在repo文件中添加以下内容,保存并退出:
 

    [gitlab-ce]
    name=Gitlab CE Repository
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/
    gpgcheck=0
    enabled=1

然后更新本地yum缓存,提高搜索安装软件的速度

# sudo yum makecache

 准备就绪,开始安装gitlab最新版,这个安装将会安装gitlab所需的所有环境,一步到位,装好即用

# sudo yum install gitlab-ce

安装完之后需要使服务生效

# sudo gitlab-ctl reconfigure

然后启用gitlab组件就能运行了

# sudo gitlab-ctl start

最后修改一下配置文件内访问路径,修改为服务器的域名

vim /etc/gitlab/gitlab.rb

将 external_url 'http://gitlab.example.com' 改为  external_url '你的服务器域名或ip'

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值