系统内存要求:至少2G
yum install -y curl policycoreutils-python openssh-server
systemctl enable sshd (开机启动sshd)
systemctl start sshd (启动sshd)
firewall-cmd --permanent --add-service=http (防火墙添加http服务)
systemctl reload firewalld (重启防火墙)
yum install postfix
systemctl enable postfix (开机启动postfix)
systemctl start postfix
这里可能会报错(Jobfor postfix.service failed because the control process exited with error code.See "systemctl st)
解决:
vi /etc/postfix/main.cf
inet_protocols =ipv4
inet_interfaces= all
重启执行systemctlstart postfix
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash
sudo EXTERNAL_URL="http://gitlab.example.com" yum install -y gitlab-ee
到这里就可以直接用ip访问git服务器了
更改服务器端口:
vi /etc/gitlab/gitlab.rb
#nginx['listen_port'] = nil在这句下面加一行
nginx['listen_port'] = 8090
访问http://192.168.92.128:8090
这边如果还访问不了,应该是防火墙配置问题
执行
firewall-cmd --zone=public --permanent --add-port=8090/tcp
firewall-cmd --reload(重启防火墙,重新访问)
如果是阿里云服务器的话,得去安全组策略添加8090端口