Gitlab安裝

1.下載鏡像

curl -LJO --insecure 鏡像地址

2.安裝文件

dpkg -i 鏡像名

如圖
image
說明安裝成功


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

參考資料

gitlab包安裝地址

gitlab 清華大學開源軟件鏡像

搭建GitLab+Jenkins持續集成環境圖文教程

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章