centos7上安装GitLab

在centos7上安装GitLab

  1. 安装相关依赖

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

2.启动postfix,并设置开机自启动

目的:支持gitlab邮件发送 
systemctl enable postfix && systemctl start postfix

如果报错:Job for postfix.service failed because the control process exited with error code. See "systemctl status postfix.service" and "journalctl -xe" for details.

修改 /etc/postfix/main.cf的设置 即可

inet_protocols = ipv4

inet_interfaces = all

3.下载安装包
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.5.2-ce.0.el7.x86_64.rpm

4.安装命令

rpm -ivh gitlab-ce-10.5.2-ce.0.el7.x86_64.rpm 

如果报错:

安装gitlab依赖后重新安装
yum install policycoreutils-python

5.修改gitlab配置文件

vi /etc/gitlab/gitlab.rb

修改external_url参数,例如服务器ip地址为10.0.19.32

external_url='http://10.211.55.10'

有端口,则放到后面即可

6.因为修改了配置文件,所以重新加载配置文件

gitlab-ctl reconfigure

7.重启gitlab服务

gitlab-ctl restart

 

8.Web页面配置

由于服务器IP 地址为 10.0.19.32而且gitlab 默认的端口号为 80,所以使用浏览器访问以下地址:
http:// 10.0.19.32:80

注意:可能会报错502
首先保证Gitlab可用运行内存大于4G,端口未被占用 
再赋予权限:chmod -R 755 /var/log/gitlab 
再重置重启 

9.默认用户名和密码

root 5iveL!fe

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值