centos7安装gitlab

本文介绍如何配置 CentOS 的阿里YUM源,并提供详细的步骤来安装 GitLab,包括安装依赖项、配置文件及启动服务等。

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

1、更换阿里yum

// 下载wget   
yum install -y wget
// 备份默认的yum
mv /etc/yum.repos.d /etc/yum.repos.d.backup
// 设置新的yum目录
mkdir /etc/yum.repos.d
// 下载阿里yum配置到该目录中
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
// 重建缓存
yum clean all
yum makecache
// 升级所有包(改变软件设置和系统设置,系统版本内核都升级,故需要几分钟耐心等待)
yum update -y

// VIM
yum install -y vim

2、安装gitlab

// 安装gitlab的依赖项
yum install -y curl openssh-server openssh-clients postfix cronie policycoreutils-python
// 安装postfix来支持gitlab发送邮件
yum install -y postfix
systemctl start postfix
systemctl enable postfix
// 清华大学镜像: https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.5.4-ce.0.el7.x86_64.rpm
// 安装rpm包
rpm -i gitlab-ce-10.5.4-ce.0.el7.x86_64.rpm
// 查看gitlab状态
gitlab-ctl status
// 修改配置文件gitlab.rb
vim /etc/gitlab/gitlab.rb

将external_url变量的地址修改为gitlab所在centos的ip地址


// 重新加载配置文件,并重启gitlab
gitlab-ctl reconfigure
gitlab-ctl restart



参考: https://www.cnblogs.com/straycats/p/7637373.html



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值