GitLab 是以 Ruby on Rails 開發的自架 Git 倉庫,功能與 GitHub 相近:瀏覽原始碼、管理 issue 與評論、控制團隊對倉庫的權限,還能查看提交歷史與檔案版本,並提供程式碼片段(snippet)功能方便 reuse。
sudo apt-get install curl openssh-server ca-certificates postfix
Postfix 是寄信用的郵件服務器,也可替換成其他 MTA。
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash sudo apt-get install gitlab-ce
這條路徑常常很慢。若不想等,可直接到官方封存頁下載 deb 包:
https://about.gitlab.com/downloads/archives/ ,選好對應版本(例如 gitlab-ce_7.10.4~omnibus-1_amd64.deb)後:
sudo dpkg -i gitlab-ce_7.10.5~omnibus-1_amd64.deb
sudo vim /etc/gitlab/gitlab.rb
主要要改的是 external_url,設成你實際要用的位址與連接埠。



改完讓設定生效:
sudo gitlab-ctl reconfigure
接著就能用 https://192.168.1.10:8080 訪問。預設管理者帳密:
Username: root Password: 5iveL!fe
首次登入會要求重設密碼。記得同時設定 SMTP 參數,否則寄信與密碼重設功能會失效。