GitLab安裝


1.GitLab簡介

GitLab 是一個用於倉庫管理系統的開源項目。使用Git作為代碼管理工具,並在此基礎上搭建起來的web服務。可通過Web界面進行訪問公開的或者私人項目。它擁有與Github類似的功能,能夠瀏覽源代碼,管理缺陷和注釋。可以管理團隊對倉庫的訪問,它非常易於瀏覽提交過的版本並提供一個文件歷史庫。團隊成員可以利用內置的簡單聊天程序(Wall)進行交流。它還提供一個代碼片段收集功能可以輕松實現代碼復用。

常用的網站:

官網:https://about.gitlab.com/

國內鏡像:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/

安裝環境:

1、  CentOS 6或者7

2、  2G內存(實驗)生產(至少4G)

3、  安裝包:gitlab-ce-10.0.6-ce

4、  禁用防火牆,關閉selinux

2.GitLab安裝

1、安裝依賴

sudo yum install curl policycoreutils openssh-server openssh-clients policycoreutils-python

sudo systemctl enable sshd

sudo systemctl start sshd

sudo yum install postfix

sudo systemctl enable postfix

sudo systemctl start postfix

 

2、獲取rpm安裝包

[root@node2 src]# cd /usr/local/src/

[root@node2 src]# wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.2.3-ce.0.el7.x86_64.rpm

3.安裝

[root@node2 src]# rpm -ivh gitlab-ce-11.2.3-ce.0.el7.x86_64.rpm 
warning: gitlab-ce-10.0.6-ce.0.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:gitlab-ce-10.0.6-ce.0.el7        ################################# [100%]
It looks like GitLab has not been configured yet; skipping the upgrade script.

       *.                  *.
      ***                 ***
     *****               *****
    .******             *******
    ********            ********
   ,,,,,,,,,***********,,,,,,,,,
  ,,,,,,,,,,,*********,,,,,,,,,,,
  .,,,,,,,,,,,*******,,,,,,,,,,,,
      ,,,,,,,,,*****,,,,,,,,,.
         ,,,,,,,****,,,,,,
            .,,,***,,,,
                ,*,.
  


     _______ __  __          __
    / ____(_) /_/ /   ____ _/ /_
   / / __/ / __/ /   / __ \`/ __ \
  / /_/ / / /_/ /___/ /_/ / /_/ /
  \____/_/\__/_____/\__,_/_.___/
  

Thank you for installing GitLab!
GitLab was unable to detect a valid hostname for your instance.
Please configure a URL for your GitLab instance by setting `external_url`
configuration in /etc/gitlab/gitlab.rb file.
Then, you can start your GitLab instance by running the following command:
  sudo gitlab-ctl reconfigure

For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md

4.配置

修改配置文件:/etc/gitlab/gitlab.rb

修改external_url 的地址為:http://192.168.56.12

修改完主配置文件后,使用gitlab-ctl reconfigure重新配置gitlab

5.啟動

重新配置gitlba后,在瀏覽地址欄中輸入http://192.168.56.12

 

配置root用戶的密碼,完成后進入系統:

 

 

至此我們的GitLab安裝已經完成

 


免責聲明!

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



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