安装依赖
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
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
添加安装源
gitlab 分ce跟ee颁布,自行选择
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash
安装
sudo EXTERNAL_URL="http://ip" yum install -y gitlab-ee
这边也可以设置域名,我一般设置ip这样直接就能访问了,默认是80端口
启动
gitlab-ctl reconfigure
gitlab-ctl start
然后就可以通过ip访问了。
搭建私有git服务器,修改完密码之后记得登录后天,把用户自主注册功能关闭。
使用
gitlab-ctl reconfigure
gitlab-ctl start
gitlab-ctl stop
gitlab-ctl restart