咱们是基于CentOS7来搭建的,因此同窗们先准备好CentOS的环境,能上网就能够了.python
其实安装步骤在GitLab的官网上都有很详细的介绍,同窗们能够到官网按照这步骤来实现就能够了。git
附上官网安装地址:https://about.gitlab.com/inst...centos
1.安装和配置必要的依赖bash
在CentOS 7 (and RedHat/Oracle/Scientific Linux 7),下面这些命令是在防火墙中开放HTTP和SSH的访问服务器
sudo yum install -y curl policycoreutils-python openssh-server
sudo systemctl enable sshd
sudo systemctl start sshd
sudo firewall-cmd --permanent --add-service=http
sudo systemctl reload firewalld
接着,安装Postfix来实现邮件通知的功能,若是你想使用其余的邮件服务器,能够跳过下面这些命令,你能够再GitLab安装完毕后自行安装其余的邮件服务器.如何配置其余的邮件服务器文档地址ssh
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
2.配置GitLab的仓库地址并下载安装包curl
添加仓库地址gitlab
curl https://packages.gitlab.com/i... | sudo bash
安装GitLabpost
yum install -y gitlab-ee
正常来讲,执行完这步以后,会帮咱们安装和自动配置GitLab相关的信息的.若是没有启动GitLab能够再执行一下这句命令。url
gitlab-ctl reconfigure
整个安装和配置的步骤时间比较长,请耐心等待。