1.安装相关依赖
yum -y install policycoreutils openssh-server openssh-clients postfix
出现下图表示上述四个依赖包安装(更新)完成
2.启动postfix 并设置开机自启动
作用:支持gitlab邮件发送
systemctl enable postfix && systemctl start postfix
3.防火墙开放http和ssh端口
firewall-cmd —permannt —add-service=http
systemctl reload firewalld
4.下载安装Gitlab
curl -LJO https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-8.9.8-ce.0.el7.x86_64.rpm
rpm -ivh gitlab-ce-8.9.8-ce.0.el7.x86_64.rpm
CentOS 7版本 对应 el7
5.安装过程中出现的问题及解决方案
问题:
解决方案:如下图,前两个命令行实现删除并重建文件。重建之后,该文件重新生成。
GitLab管理命令
查看GitLab状态:
gitlab-ctl status
关闭GitLab:
Gitlab有进程保护,即使你kill它,它很快会重新启动,所以你需要执行该命令关闭它。
gitlab-ctl stop
重启GitlLab:
gitlab-ctl restart
Gitlab重新配置:
gitlab-ctl reconfigure