一、 安装并配置必要的依赖关系
在CentOS系统上安装所需的依赖:ssh,防火墙,postfix(用于邮件通知) ,wget,以下这些命令也会打开系统防火墙中的HTTP和SSH端口访问。
1.安装Postfix以发送通知邮件,安装命令:
sudo yum install postfix
2.将postfix服务设置成开机自启动,安装命令:
sudo systemctl enable postfix
3.启动postfix,安装命令:
sudo systemctl start postfix
在安装Postfix期间,可能会出现配置屏幕。选择“Internet Site”并按enter键。使用您的服务器的外部DNS以“mail name”并按enter。如果出现额外的屏幕,继续按enter键接受默认值。
二、添加GitLab镜像源并安装gitlab服务器
1.添加gitlab镜像
上清华大学镜像库下载 https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm
2.安装gitlab 安装命令:rpm -i gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm
安装过程需要些时间,如果出现下图,则说明安装成功。