centerOS 安装 gitLab

本文详细介绍了如何在Linux系统上部署GitLab社区版的过程,包括更新yum源、安装GitLab CE、更改默认监听端口等步骤,并提供了常用的GitLab管理命令。

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

参考: https://www.cnblogs.com/weifeng1463/p/7714492.html


1,更新yum源

vi /etc/yum.repos.d/gitlab-ce.repo

添加以下内容:

[gitlab-ce]
name=Gitlab CE Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/
gpgcheck=0
enabled=1

2,更新本地yum缓存

yum makecache

3,安装gitLab社区版

yum install gitlab-ce

4,更改默认监听端口号:

vi /etc/gitlab/gitlab.rb

修改如下行:

#nginx['listen_port'] = nil
改为
nginx['listen_port'] = 8080

5,重启

gitlab-ctl reconfigure
gitlab-ctl restart

6,其它常用命令

sudo gitlab-ctl start    # 启动所有 gitlab 组件;
sudo gitlab-ctl stop        # 停止所有 gitlab 组件;
sudo gitlab-ctl restart        # 重启所有 gitlab 组件;
sudo gitlab-ctl status        # 查看服务状态;
sudo gitlab-ctl reconfigure        # 启动服务;
sudo vim /etc/gitlab/gitlab.rb        # 修改默认的配置文件;
gitlab-rake gitlab:check SANITIZE=true --trace    # 检查gitlab;
sudo gitlab-ctl tail        # 查看日志;


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值