1、安装 sshd,centos 7.4 自带可略过
sudo yum install -y curl policycoreutils-python openssh-server
sudo systemctl enable sshd
sudo systemctl start sshd
2、我本地安装了一下 iptables-services,为后续打开端口准备
sudo yum install iptables-services
3、安装、开启邮件服务
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
4、到某个目录,下载脚本,授权、执行
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh > script.rpm.sh
chmod +x script.rpm.sh
./script.rpm.sh
5、安装 gitlab-ee
sudo yum install -y gitlab-ee
6、修改配置
配置文件:/etc/gitlab/gitlab.rb
external_url 'http://192.168.74.128'
nginx['listen_addresses'] = ['0.0.0.0', '[::]']
nginx['listen_port'] = 9899
7、重新加载配置,这个步骤比较耗时
gitlab-ctl reconfigure
8、重启
gitlab-ctl restart
9、放开端口 9899
iptables -I INPUT -ptcp --dport 9899 -j ACCEPT
10、访问
1、停服务
sudo gitlab-ctl stop
2、卸载服务
sudo rpm -e gitlab-ee
3、删除守护进程
ConstXiong 备案号:苏ICP备16009629号-3