文章目錄
1.下載鏡像
curl -LJO --insecure 鏡像地址
2.安裝文件
dpkg -i 鏡像名
如圖
說明安裝成功
3.文件配置
3.1. 打開配置文件
/etc/gitlab/gitlab.rb
3.2.修改external_url參數
external_url 'http://192.168.0.88:8060'
如果出現如下錯誤
Ran ["usermod", "-s", "/bin/sh", "-d", "/var/opt/gitlab", "git"] returned 8
3.3. 修改用戶名
user['username'] = "gitlab"
user['group'] = "gitlab"
3.4. 修改unicorn端口
unicorn['port'] = 8061
3.5. 重新配置giutlab
sudo gitlab-ctl reconfigure
等待一個漫長的安裝過程。。。
4.服務的啓動與關閉
4.1. 啓動服務
# Start all GitLab components
sudo gitlab-ctl start
4.2. 關閉服務
# Stop all GitLab components
sudo gitlab-ctl stop
4.3.重啓服務
# Restart all GitLab components
sudo gitlab-ctl restart