centos 7 安装gitlab服务器,并访问详细步骤

首先,参照了官网安装步骤。https://about.gitlab.com/installation/#centos-7

 

 

1.安装并配置必要的依赖项

 

在CentOS 7(和RedHat / Oracle / Scientific Linux 7)上,以下命令还将在系统防火墙中打开HTTP和SSH访问。

sudo yum install -y curl policycoreutils-python openssh-server
sudo systemctl enable sshd
sudo systemctl start sshd

sudo firewall-cmd --permanent --add-service=http
sudo systemctl reload firewalld


接下来,安装Postfix以发送通知电子邮件。如果要使用其他解决方案发送电子邮件,请跳过此步骤并在安装GitLab后配置外部SMTP服务器

sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
 

在Postfix安装期间,可能会出现配置屏幕。选择“Internet Site”并按Enter键。使用服务器的外部DNS作为“邮件名称”,然后按Enter键。如果出现其他屏幕,请继续按Enter键接受默认值。

2.添加GitLab软件包存储库并安装软件包

添加GitLab包存储库。

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash

接下来,安装GitLab包。将`http:// gitlab.example.com`更改为您要访问GitLab实例的URL。安装将自动配置并启动该URL的GitLab。HTTPS 在安装后需要其他配置

 vi  /etc/gitlab/gitlab.rb修改如下

external_url 'http://59.110.159.79:8085'      //需要添加ip+端口或者(域名+端口)

设置完成之后:

 

重置配置

sudo gitlab-ctl reconfigure
重启gitlab服务

sudo gitlab-ctl restart
 

浏览器访问:http://59.110.159.79:8085/

问题汇总

1.改了端口,浏览器访问不到,这时需要注意centos firewall防火墙端口开放没有

2.浏览器访问502.一般是端口冲突,需另外改gitlab端口,步骤参考上面。改完端口,重启gitlab服务器

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

8一天不

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

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

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

打赏作者

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

抵扣说明:

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

余额充值