CentOS7 安装 GitLab

本文详细介绍如何在CentOS7上安装配置GitLab,包括安装依赖、设置防火墙、安装Postfix邮件服务、添加GitLab软件包及初始化密码等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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 安装成功!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值