gitlab私有环境搭建

1. 环境准备

  安装所需的依赖包

yum install curl openssh-server openssh-clients postfix cronie
GitLab使用postfix发送邮件
service postfix start
#设置postfix开机自启动
chkconfig postfix on
postfix报错postfix: fatal: parameter inet_interfaces: no local interface found for ::1
解决办法:
vim /etc/postfix/main.cf
inet_interfaces = localhost
inet_protocols = all
改为
inet_interfaces = all
inet_protocols = all
重启 service postfix start 

2. 安装gitlib-ce

 首先配置yum源

vi /etc/yum.repos.d/gitlab-ce.repo

[gitlab-ce]
name=gitlab-ce
baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6
repo_gpgcheck=0
gpgcheck=0
enabled=1
gpgkey=https://packages.gitlab.com/gpg.key

 安装gitlib 

yum install gitlab-ce
初始化gitlib之后自动启动
gitlab-ctl reconfigure

其它命令

#开启
gitlab-ctl start
#关闭
gitlab-ctl stop
#重启
gitlab-ctl restart

3. 修改gitlib的默认80端口

vim /etc/gitlab/gitlab.rb

external_url 'http://47.103.*.*:8089'

重新执行命令

  gitlab-ctl reconfigure

扫描二维码关注公众号,回复: 6510460 查看本文章

4. 在浏览器输入IP加端口

 

猜你喜欢

转载自www.cnblogs.com/mutong1228/p/11031327.html