gitlab本地部署方法(ubuntu16.04+gitlab9.5.5)

Gitlab本地部署方法nginx

 

1 前期準備

電腦配置:windows7 ,內存8GB以上(由於有4GB左右要分配給虛擬機中的ubuntu)git

虛擬機:VMwareredis

Linux系統:ubuntu16.04 64bitsql

2 Gitlab的搭建

2.1 Gitlab的安裝

1.安裝依賴包,運行命令ubuntu

 sudo apt-get install curl openssh-server ca-certificates postfixwindows

執行完成後,出現郵件配置,選擇Internet那一項(不帶Smarthost的)瀏覽器

 

2.安裝gitlab-ce軟件包ssh

https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu/pool/xenial/main/g/gitlab-ce/連接中下載最新版gitlab-ce(這裏下載gitlab-ce_9.5.5-ce.0_amd64.deb)curl

 

3.執行命令:ide

apt-get update

dpkg –i gitlab-ce_9.5.5-ce.0_amd64.deb

 

4.修改gitlab的配置

gedit /etc/gitlab/gitlab.rb

修改external_url爲

external_url 'http://172.16.15.144'

該ip地址爲ubuntu的ip地址(具體採用ifconfig查看)

注意:gitlab的ip必須跟ubuntu的ip相同,這樣局域網中其餘計算機才能訪問到gitlab

 

5.gitlab配置從新生成

gitlab-ctl reconfigure

 

6.檢查GitLab是否安裝好而且已經正確運行,輸入下面的命令

 sudo gitlab-ctl status

 

7.若是獲得相似下面的結果,則說明GitLab運行正常

run: gitlab-workhorse: (pid 1148) 884s; run: log: (pid 1132) 884s  

run: logrotate: (pid 1150) 884s; run: log: (pid 1131) 884s 

run: nginx: (pid 1144) 884s; run: log: (pid 1129) 884s 

run: postgresql: (pid 1147) 884s; run: log: (pid 1130) 884s

run: redis: (pid 1146) 884s; run: log: (pid 1133) 884s 

run: sidekiq: (pid 1145) 884s; run: log: (pid 1128) 884s   

run: unicorn: (pid 1149) 885s; run: log: (pid 1134) 885s

 

8.在瀏覽器地址欄中輸入: http://172.16.15.144,便可訪問GitLab的Web頁面

 

 

參考資料:

1.http://www.jianshu.com/p/92f97939e33a

2.https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu/pool/xenial/main/g/gitlab-ce/

相關文章
相關標籤/搜索