Ubuntu 16.04搭建專署的gitlab服務(wù)器:安裝gitlab

Ubuntu 16.04搭建GitLab服務(wù)器的官方操作指南地址:
https://about.gitlab.com/downloads/#ubuntu1604。
1.安裝依賴包,運(yùn)行如下命令

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

執(zhí)行完成后,郵件配置時(shí)候選擇Internet即可。
2、如果按照官方操作,直接
運(yùn)行

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
sudo apt-get install gitlab-ce

安裝估計(jì)需要三個(gè)小時(shí)才能完成,主要是下載太慢。
所以建議使用清華大學(xué)的鏡像文件服務(wù)器進(jìn)行安裝,幾分鐘就能下載完畢。
鏡像地址:https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/

首先信任 GitLab 的 GPG 公鑰:

curl https://packages.gitlab.com/gpg.key 2> /dev/null | sudo apt-key add - &>/dev/null

修改root密碼:

sudo passwd root

然后用root賬戶,打開vi:

su root
vi /etc/apt/sources.list.d/gitlab-ce.list

deb https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu xenial main

粘貼至文本中,按Esc鍵,鍵入:,最后輸入wq保存并退出。
安裝 gitlab-ce:

sudo apt-get update
sudo apt-get install gitlab-ce

下載還是挺快的,只花了45秒的時(shí)間,用官方原址下載,幾十K的速度的確很焦人。


安裝.png

安裝完成之后啟動(dòng)gitlab.

sudo gitlab-ctl reconfigure

打開 sshd 和 postfix 服務(wù)

service sshd start
service postfix start

最后,可通過輸入下面的命令,檢查GitLab是否安裝成功并正常運(yùn)行。

sudo gitlab-ctl status

在瀏覽器中打開:http://127.0.0.1。
首次使用時(shí),GitLab會(huì)提示設(shè)置密碼,設(shè)置后就可以正常使用了。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容