Centos7 上 GitLab 详细安装步骤

1.安装 gitlab 之前, 先安装好git服务, 可参照 git 官网安装链接  

2.安装包 gitlab-ce-10.8.2-ce.0.el7.x86_64.rpm 下载

3.

sudo rpm -ivh /opt/gitlab-ce-10.8.2-ce.0.el7.x86_64.rpm
sudo yum install -y curl policycoreutils-python openssh-server cronie
sudo yum install -y lokkit 
sudo lokkit -s http -s ssh
sudo yum install postfix
sudo service postfix start
sudo chkconfig postfix on
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
# 下面地址可以不用修改, 等待安装完成, 编译时在修改
sudo EXTERNAL_URL="http://127.0.0.1" yum -y install gitlab-ce

在安装lokkit -s http -s ss 报错如下,需要关闭防火墙。

[root@localhost ~]# lokkit -s http -s ss
ERROR: FirewallD is active, please use firewall-cmd.
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# 

   29  lokkit -s http -s ssh
   30  yum install postfix
   31  service postfix start
   32  chkconfig postfix on
   33  chkconfig postfix on curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
   34  sudo EXTERNAL_URL="http://127.0.0.1" yum -y install gitlab-ce
   35  cd /opt
   36  ls
   37  sudo EXTERNAL_URL="http://127.0.0.1" yum -y install gitlab-ce
   38  ls
   39  sudo EXTERNAL_URL="http://127.0.0.1" yum -y install gitlab-ce-10.8.2-ce.0.el7.x86_64.rpm 

至此安装成功。

安装成功后再浏览器输入你gitlab的IP地址的地址打开页面,打开页面后 会让你先输入密码,和确认密码,这个密码是gitlab的root账户的密码。输入完成后 就可以使用root账户登录了

 

Gitlab安装完成后的配置以及问题解决

情况1: 服务启动, 但是访问ip无法出现gitlab相关页面

 情况2: 服务启动成功, 可以访问gitlab页面,但是页面提示 502 错误

以上两种错误,都是由于端口被占用导致的, 这个时候可以执行命令

$ gitlab-ctl tail   来查看相关日志输出, 在这里你可以看到, 日志输出哪些端口被占用。

还可以使用命令行

$ gitlab-ctl status   来查看各个服务的状态

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值