centos7下gitlab服务器搭建

本文介绍如何在CentOS7上安装GitLab,并通过一系列命令进行必要的软件包安装及服务配置。此外还提供了GitLab配置文件的位置及启动命令。

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

1、安装gitlab

运行一下脚本在centos7安装gitlab

#!/bin/bash

set -x
echo "install pre install package in localhost"
sudo yum install curl openssh-server -y
sudo systemctl enable sshd
sudo systemctl start sshd
sudo yum install postfix -y
sudo systemctl enable postfix
sudo systemctl start postfix

echo "config gitlab-ce qinghua yum repo"
echo -e "[gitlab-ce]\nname=Gitlab CE Repository\nbaseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el\$releasever/\ngpgcheck=0\nenabled=1" > /etc/yum.repos.d/gitlab-ce.repo

echo "install gitlab-ce in localhost"
sudo yum makecache
sudo yum install gitlab-ce -y
set +x
2、修改配置并启动gitlab服务器

/etc/gitlab/gitlab.rb为配置文件

# vi /etc/gitlab/gitlab.rb #该配置文件注释有详细说明,一般用途不作修改

执行一下命令启动gitlab服务器

# sudo gitlab-ctl reconfigure
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值