咱們是基於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
整個安裝和配置的步驟時間比較長,請耐心等待。