1. 程式人生 > >CentOS7 安裝 GitLab

CentOS7 安裝 GitLab

CentOS7 安裝 GitLab

GitLab是一個基於 Web 的 Git 倉庫管理工具,且具有wiki 和 issue 跟蹤功能


1、配置並安裝依賴

yum -y update
yum -y install firewalld
yum -y install curl

2、在系統防火牆中開啟 HTTP 和 SSH 訪問

yum install -y curl policycoreutils-python openssh-server
systemctl enable sshd
systemctl start sshd
firewall-cmd
--permanent --add-service=http systemctl reload firewalld

3、安裝 Postfix 傳送通知郵件

yum -y install postfix
systemctl enable postfix
systemctl start postfix

4、新增 GitLab 軟體包

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | bash

5、安裝 GitLab

  • http://gitlab.example.com
    更改為想要訪問您的 GitLab 的 URL ,域名、IP 都行
EXTERNAL_URL="http://gitlab.example.com" yum install -y gitlab-ee
  • 出現下圖所示,安裝成功
   _______ __  __          __
    / ____(_) /_/ /   ____ _/ /_
   / / __/ / __/ /   / __ `/ __ \
  / /_/ / / /_/ /___/ /_/ / /_/ /
  \____/_/\__/_____/\__,_/_.___/


Thank you for installing GitLab!
GitLab should be available at http://69.12.78.155
For a comprehensive list of configuration options please see the Omnibus GitLab readme https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md Verifying : gitlab-ee-10.6.3-ee.0.el7.x86_64 1/1 Installed: gitlab-ee.x86_64 0:10.6.3-ee.0.el7 Complete!

6、初始化密碼並登陸

第一次訪問時,將被重定向到重置密碼頁面。需要為管理員帳戶設定密碼,使用預設帳戶的使用者名稱root登入。

至此,GitLab 安裝成功!