1.安装SSH
yum install -y curl policycoreutils-pythonopenssh-server
2.将SSH设置成开机启动
systemctl enable sshd
3.启动SSH命令
systemctl start sshd
4.开启防火墙
service firewalld start
5.添加http服务到firewalld,pemmanent表示永久生效
firewall-cmd --permanent --add-service=http
6.重启防火墙
systemctl reload firewalld
7.安装Postfix以发送通知邮件
yum install postfix
8.将postfix服务设置成开机自启动
systemctl enable postfix
9.启动postfix
systemctl start postfix
10.下载gitlab镜像
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.11.0-ce.0.el7.x86_64.rpm
11.安装gitlab,先安装qu依赖,否则会报错
yum install policycoreutils-python rpm -i gitlab-ce-11.11.0-ce.0.el7.x86_64.rpm
12.修改gitlab配置文件指定服务器ip和自定义端口
vi /etc/gitlab/gitlab.rb external_url = 'http://ip:端口' nginx['listen_port'] = 端口
13.刷新配置GitLab
gitlab-ctl reconfigure
14.重置并启动GitLab
gitlab-ctl restart