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


Gitlab本地部署方法

 

1 前期准備

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

虛擬機:VMware

Linux系統:ubuntu16.04 64bit

2 Gitlab的搭建

2.1 Gitlab的安裝

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

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

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

 

2.安裝gitlab-ce軟件包

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)

 

3.執行命令:

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/


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM