具體安裝步驟以下:html
1、安裝和配置必要的依賴git
If you install Postfix to send email please select 'Internet Site' during setup. Instead of using Postfix you can also use Sendmail or configure a custom SMTP server and configure it as an SMTP server.centos
On CentOS, the commands below will also open HTTP and SSH access in the system firewall.bash
sudo yum install -y curl policycoreutils openssh-server openssh-clients libsemanage-static libsemanage-devel sudo systemctl enable sshd sudo systemctl start sshd sudo yum install -y postfix sudo systemctl enable postfix sudo systemctl start postfix sudo firewall-cmd --permanent --add-service=http sudo systemctl reload firewalld
2、下載 GitLab 安裝包,並安裝服務器
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sud o bash sudo yum install -y gitlab-ce
3、配置並啓動 GitLabssh
sudo gitlab-ctl reconfigure
4、瀏覽 GitLab 網站curl
第一次訪問網站的時候,須要修改密碼。默認的用戶是 root。登陸成功後,自行建立其餘用戶,或者建立
倉庫。gitlab
參考資料:post
更多詳細內容,歡迎學習 GitHub 開源之旅第十一季:Git 服務器搭建 在線課程。