centos7部署gitlab

本文详细指导了如何在Linux系统中安装必要的依赖,启动SSH服务,配置firewalld,下载并安装GitLab,设置访问地址、端口,以及初始化和安全设置的过程。
摘要由CSDN通过智能技术生成

1.安装依赖环境

yum install -y curl policycoreutils-python openssh-server wget perl vim sudo zip

2.启动ssh并设置为开机自启动

systemctl enable sshd
systemctl start sshd

3.添加http/https服务到firewalld,pemmanent表示永久生效,若不加-permanent系统下次启动后就会失效

systemctl start firewalld
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
systemctl reload firewalld

4.在线下载gitlab

wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-16.7.7-ce.0.el7.x86_64.rpm/download.rpm

5.安装

rpm -i gitlab-ce-16.7.7-ce.0.el7.x86_64.rpm

安装后时间要稍微等一会儿会出现图形界面 

6.修改ip

vim /etc/gitlab/gitlab.rb

7.重新配置

gitlab-ctl reconfigure

 

此命令花费时间较长,耐心等待

8.重新启动

gitlab-ctl restart

 

9.访问

http://ip

第一次输入地址会报错502,再次输入就好了 

 

并不知道账号密码,通过

cat /etc/gitlab/initial_root_password

及时更改密码,此密码24小时后过期

10.修改访问地址和端口

vim /etc/gitlab/gitlab.rb

gitlab-ctl reconfigure
firewall-cmd --zone=public --add-port=4567/tcp --permanent
firewall-cmd --reload
firewall-cmd --zone=public --list-ports
netstat -lnpt
gitlab-ctl restart

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值