centos搭建gitlib

sudo yum install -y curl policycoreutils-python openssh-server

sudo yum -y install postfix
sudo systemctl enable postfix
sudo systemctl start postfix

yum -y install wget vim

//systemctl stop firewalld.service #停止firewall
//systemctl disable firewalld.service #禁止firewall开机启动
yum install iptables-services -y
vi /etc/sysconfig/iptables
开放gitlab端口

systemctl start firewalld.service 启动

systemctl stop firewalld.service 停止

firewall-cmd --reload. 重新加载

firewall-cmd --zone=public --add-port=28888/tcp --permanent


systemctl restart iptables.service
systemctl enable iptables.service

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.9.8-ce.0.el7.x86_64.rpm
rpm -i gitlab-ce-11.9.8-ce.0.el7.x86_64.rpm
vim /etc/gitlab/gitlab.rb
修改域名及端口:external_url "http://ip或域名:端口"
gitlab-ctl reconfigure
gitlab-ctl restart

原文地址:https://www.cnblogs.com/zyb2016/p/11051894.html