一:安装准备
1、安准基础依赖(这一步基本都可以跳过,很多服务器默认安装)
#安装技术依赖
sudo yum install -y policycoreutils-python openssh-server
#启动ssh服务&设置为开机启动
sudo systemctl enable sshd
sudo systemctl start sshd
2、安装Postfix
Postfix是一个邮件服务器,GitLab发送邮件需要用到
#安装postfix
sudo yum install -y postfix
#启动postfix并设置为开机启动
sudo systemctl enable postfix
sudo systemctl start postfix
3、开放ssh以及http服务或者直接关闭防火墙
根据实际情况执行,公司内部服务器初始时,防火墙就没打开
#开放ssh、http服务
sudo firewall-cmd --add-service=ssh --permanent
sudo firewall-cmd --add-service=http --permanent
#重载防火墙规则
sudo firewall-cmd --reload
清除防火墙规则
iptables -F
如果要卸载centos7防火墙
yum -y remove firewall
二、部署过程
本次我们部署的是社区版:gitlab-ce,如果要部署商业版可以把关键字替换为:gitlab-ee
1、Yum安装GitLab
添加GitLab社区版Package
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
安装GitLab社区版
sudo yum install -y gitlab-ce

最低0.47元/天 解锁文章
5055





