如何在Centos8中安裝GitLab-CE

夢共裡醉發表於2021-02-25
導讀 GitLab是一個基於web介面的Git倉庫管理程式,包括程式碼審計、wikis、問題跟蹤等功能。使用GitLab建立、檢查和部署程式碼非常容易。它可以託管在我們自己的伺服器上,在官方伺服器也提供免費的倉庫託管,類似於Github。

GitLab有三個不同的版本可用:Community Edition(CE)、Enterprise Edition(EE)和 GitLab託管版本。其中CE版本是開源免費的。EE版本是企業版,需要付費使用的。

環境
  • 8
  • gitlab-ce-13.1.4

推薦cpu核心數量為4核,推薦記憶體大小為4GB。

安裝GitLab-CE

新建/etc/yum.repos.d/gitlab-ce.repo倉庫檔案,然後複製內容到檔案裡。

[root@localhost ~]# touch /etc/yum.repos.d/gitlab-ce.repo 
[gitlab-ce] name=Gitlab CE Repository baseurl=

如何在Centos8中安裝GitLab-CE如何在Centos8中安裝GitLab-CE
更新yum快取,然後安裝gitlab-ce:

[root@localhost ~]# yum makecache
[root@localhost ~]# yum -y install gitlab-ce

如何在Centos8中安裝GitLab-CE如何在Centos8中安裝GitLab-CE
安裝完成。

防火牆中開放埠
[root@localhost ~]# firewall-cmd --permanent --add-service=http
success
[root@localhost ~]# firewall-cmd --permanent --add-service=https
success
[root@localhost ~]# firewall-cmd --reload
success
配置並啟動gitlab

剛安裝完,需要配置一下gitlab。

[root@localhost ~]# gitlab-ctl reconfigure

配置完成之後已經啟動所有服務了,已經設定好開機啟動了。

gitlab-ctl的常用的操作:

# 重置應用
gitlab-ctl reconfigure
# 啟動所有服務
gitlab-ctl start
# 關閉所有服務
gitlab-ctl stop
# 重啟所有服務
gitlab-ctl restart
# 列出所有服務
gitlab-ctl service-list
# 檢視服務狀態
gitlab-ctl status
web介面訪問GitLab

在瀏覽器輸入本機ip地址,訪問gitlab,第一次訪問需要為管理員設定密碼:
如何在Centos8中安裝GitLab-CE如何在Centos8中安裝GitLab-CE
預設的使用者是 root,剛設定好密碼,可以登入了:
如何在Centos8中安裝GitLab-CE如何在Centos8中安裝GitLab-CE

如何在Centos8中安裝GitLab-CE如何在Centos8中安裝GitLab-CE
然後就可以建立project了。
如何在Centos8中安裝GitLab-CE如何在Centos8中安裝GitLab-CE

總結

GitLab能夠整合大量的工具,如Slack、Hipchat、LDAP、JIRA、Jenkins、許多型別的鉤子和一個完整的API。

本文原創地址:

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69955379/viewspace-2705751/,如需轉載,請註明出處,否則將追究法律責任。

相關文章