Linux下GitLab部署配置

搭建GitLab

???????目前公司內(nèi)網(wǎng)使用的是SVN,之前搭建時項目和開發(fā)人員并不多,所以也沒走LDAP認證;現(xiàn)在人員增加茫多,加上新來的開發(fā)人員比較習(xí)慣用GitHub,由于公司業(yè)務(wù)比較敏感邓萨,所幸搭建一套內(nèi)網(wǎng)GitLab地梨,配置LDAP認證。

1.用bitnami上的封裝包部署

https://bitnami.com/redirect/to/90913/bitnami-gitlab-8.4.2-0-linux-x64-installer.run

2.下載完成后缔恳,直接在服務(wù)器上執(zhí)行即可

./bitnami-gitlab-8.2.3-4-linux-x64-installer.run

Error: There has been an error.
The installation has detected that the current umask is set to permissions of 
0027, the installation is now exiting. You should modify your umask to at least 
0022 before launching the installer. After the installation has completed, reset 
the umask permissions to your original values.
Press [Enter] to continue:
這里發(fā)現(xiàn)報錯宝剖,按照提示將umask值設(shè)置為0022即可.

Welcome to the Bitnami Gitlab Stack Setup Wizard.
----------------------------------------------------------------------------
Select the components you want to install; clear the components you do not want 
to install. Click Next when you are ready to continue.

PhpPgAdmin [Y/n] :
*這里選擇Y*
GitLab : Y (Cannot be edited)

Is the selection above correct? [Y/n]: y
*確認上述配置*
----------------------------------------------------------------------------
Installation folder

Please, choose a folder to install Bitnami Gitlab Stack

Select a folder [/opt/gitlab-8.2.3-4]: 
*填寫安裝Gitlab的目錄*
----------------------------------------------------------------------------
Create Admin account

Bitnami Gitlab Stack admin user creation

Email Address [user@example.com]: ***git@XXX.com.cn***
*配置管理員郵件地址*
Login [root]:

Password :
Please confirm your password :
*配置管理員賬戶和密碼*

Hostname that will be used to create internal URLs. If this value is incorrect, 
you may be unable to access your Gitlab installation from other computers. It is 
advisable to use a Domain instead of an IP address for compatibility with 
different browsers.

Domain [XXX.XXX.XX.XX]: XXX.XXX.XXX.XXX

Do you want to configure mail support? [y/N]: y
*配置訪問地址*
----------------------------------------------------------------------------
Configure SMTP Settings

This is required so your application can send notifications via email.

Default email provider:

[1] GMail
[2] Custom
Please choose an option [1] : 2
*選擇郵箱類型*
----------------------------------------------------------------------------
Configure SMTP Settings

This data is stored in the application configuration files and may be visible to 
others. For this reason, it is recommended that you do not use your personal 
account credentials.

Username []: git@XXX.com.cn

Password :
Re-enter :
SMTP Host []: smtp.exmail.qq.com

SMTP Port [587]: 

Secure connection

[1] None
[2] SSL
[3] TLS
Please choose an option [3] :  
*配置郵箱*
----------------------------------------------------------------------------
Setup is now ready to begin installing Bitnami Gitlab Stack on your computer.

Do you want to continue? [Y/n]: y

----------------------------------------------------------------------------
Please wait while Setup installs Bitnami Gitlab Stack on your computer.

 Installing
 0% ______________ 50% ______________ 100%
 #########################################
----------------------------------------------------------------------------
Setup has finished installing Bitnami Gitlab Stack on your computer.

Info: To access the Bitnami Gitlab Stack, go to
http://10.12.3.21:80 from your browser.
Press [Enter] to continue:
*安裝完成*

3.訪問GitLab網(wǎng)頁

  • 登錄界面


    image
  • 登錄成功
    [圖片上傳失敗...(image-a211b6-1530496467610)]

4.配置LDAP庫

  • 修改配置文件,開啟LDAP驗證:vim ./config/gitlab.yml
ldap:   
enabled: true                     #默認是false
label: 'LDAP'                     
host: 'XXX.XXX.XXX.XXX'              #填寫LDAP服務(wù)器ip
port: 389                         #LDAP服務(wù)器端口歉甚,默認是389万细;如加密,則為636
uid: 'sAMAccountName'
method: 'plain'                   #LDAP認證模式纸泄,plain是簡單認證,加密認證有ssl和tls
bind_dn: '$LDAPUSER'                 #連接LDAP的帳號
password: '$LDAPPASSWD'     #連接LDAP的密碼
base: 'OU=XXX,DC=corp,DC=XXXX,DC=com,DC=cn'  #組織架構(gòu)赖钞,因為用的是總部的LDAP,這里精確到OU
  • 配置完成后重啟Git

    /opt/gitlab-8.2.3-4/ctlscript.sh restart

5.訪問gitlab頁面

  • 顯示LDAP登錄頁聘裁,到這里GitLab搭建完成
    [圖片上傳失敗...(image-310ad8-1530496467610)]
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末雪营,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子衡便,更是在濱河造成了極大的恐慌献起,老刑警劉巖,帶你破解...
    沈念sama閱讀 216,544評論 6 501
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件镣陕,死亡現(xiàn)場離奇詭異谴餐,居然都是意外死亡,警方通過查閱死者的電腦和手機呆抑,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,430評論 3 392
  • 文/潘曉璐 我一進店門岂嗓,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人鹊碍,你說我怎么就攤上這事厌殉。” “怎么了侈咕?”我有些...
    開封第一講書人閱讀 162,764評論 0 353
  • 文/不壞的土叔 我叫張陵年枕,是天一觀的道長。 經(jīng)常有香客問我乎完,道長熏兄,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 58,193評論 1 292
  • 正文 為了忘掉前任树姨,我火速辦了婚禮摩桶,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘帽揪。我一直安慰自己硝清,他們只是感情好,可當我...
    茶點故事閱讀 67,216評論 6 388
  • 文/花漫 我一把揭開白布转晰。 她就那樣靜靜地躺著芦拿,像睡著了一般士飒。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上蔗崎,一...
    開封第一講書人閱讀 51,182評論 1 299
  • 那天酵幕,我揣著相機與錄音,去河邊找鬼缓苛。 笑死芳撒,一個胖子當著我的面吹牛,可吹牛的內(nèi)容都是我干的未桥。 我是一名探鬼主播笔刹,決...
    沈念sama閱讀 40,063評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼冬耿!你這毒婦竟也來了舌菜?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 38,917評論 0 274
  • 序言:老撾萬榮一對情侶失蹤亦镶,失蹤者是張志新(化名)和其女友劉穎酷师,沒想到半個月后,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體染乌,經(jīng)...
    沈念sama閱讀 45,329評論 1 310
  • 正文 獨居荒郊野嶺守林人離奇死亡山孔,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,543評論 2 332
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了荷憋。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片台颠。...
    茶點故事閱讀 39,722評論 1 348
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖勒庄,靈堂內(nèi)的尸體忽然破棺而出串前,到底是詐尸還是另有隱情,我是刑警寧澤实蔽,帶...
    沈念sama閱讀 35,425評論 5 343
  • 正文 年R本政府宣布荡碾,位于F島的核電站,受9級特大地震影響局装,放射性物質(zhì)發(fā)生泄漏坛吁。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點故事閱讀 41,019評論 3 326
  • 文/蒙蒙 一铐尚、第九天 我趴在偏房一處隱蔽的房頂上張望拨脉。 院中可真熱鬧,春花似錦宣增、人聲如沸玫膀。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,671評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽帖旨。三九已至箕昭,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間解阅,已是汗流浹背落竹。 一陣腳步聲響...
    開封第一講書人閱讀 32,825評論 1 269
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留瓮钥,地道東北人。 一個月前我還...
    沈念sama閱讀 47,729評論 2 368
  • 正文 我出身青樓烹吵,卻偏偏與公主長得像碉熄,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子肋拔,可洞房花燭夜當晚...
    茶點故事閱讀 44,614評論 2 353

推薦閱讀更多精彩內(nèi)容