一.安装并配置必要的依赖关系
1.安装ssh
sudo yum install -y curl policycoreutils-pythonopenssh-server
2.将SSH服务设置成开机自启动,安装命令:
sudo systemctl enable sshd
3.启动SSH服务,安装命令:
sudo systemctl start sshd
4.开启防火墙,安装命令:
service firewalld start
5.添加http服务到firewalld,pemmanent表示永久生效,若不加--permanent系统下次启动后就会失效。
sudo firewall-cmd --permanent --add-service=http
6.重启防火墙,安装命令:
sudo systemctl reload firewalld
7.安装Postfix以发送通知邮件,安装命令:
sudo yum install postfix
8.将postfix服务设置成开机自启动,安装命令:
sudo systemctl enable postfix
9.启动postfix,安装命令:
sudo systemctl start postfix
二、添加GitLab镜像源并安装gitlab服务器
1.添加gitlab镜像
wget mirrors.tuna.tsinghua.edu.cn/gitlab-ce/y…
2.2.安装gitlab 安装命令:
rpm -i gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm
3.修改gitlab配置文件指定服务器ip和自定义端口:
vi /etc/gitlab/gitlab.rb
4.重置并启动GitLab
gitlab-ctlreconfigure
gitlab-ctl restart