在CentOS7安装部署GitLab服务

CentOS 7 安装 Gitlab

官方安装教程:https://about.gitlab.com/install/

参考安装教程:https://developer.aliyun.com/article/74395

安装配置

Step1:配置yum源

shell 复制代码
vim /etc/yum.repos.d/gitlab-ce.repo

存入以下内容:

shell 复制代码
[gitlab-ce]
name=gitlab-ce
baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6
Repo_gpgcheck=0
Enabled=1
Gpgkey=https://packages.gitlab.com/gpg.key

Step2:更新本地yum缓存

shell 复制代码
sudo yum makecache

Step3:安装GitLab社区版

shell 复制代码
sudo yum intall gitlab-ce        #自动安装最新版
sudo yum install gitlab-ce-x.x.x    #安装指定版本

Step4:启动Gitlab

shell 复制代码
gitlab-ctl reconfigure    # 仅加载新配置时需要执行此命令
gitlab-ctl start

Step5:登录并配置Gitlab

打开服务器本地浏览器,访问:127.0.0.1 地址,打开 Gitlab 管理后台,根据提示完成设置即可!

GitLab常用命令

shell 复制代码
sudo gitlab-ctl reconfigure    # 重新加载配置(主要用于修改/etc/gitlab/gitlab.rb文件后执行)
sudo gitlab-ctl start    # 启动 GitLab
sudo gitlab-ctl stop    # 停止 GitLab
sudo gitlab-ctl restart    # 重启 GitLab
sudo gitlab-ctl status    # 查看 GitLab 状态

sudo gitlab-ctl tail    # 查看日志
sudo gitlab-ctl tail postgresql    # 查看 postgresql 日志
sudo gitlab-ctl tail nginx/gitlab_acces.log    # 查看 nginx 访问日志
gitlab-rake gitlab:check SANITIZE=true --trace    # 检查gitlab

其它说明

复制代码
sudo vim /etc/gitlab/gitlab.rb        # 修改默认的配置文件(修改完成后,执行 `gitlab-ctl reconfigure ` 使配置生效)
相关推荐
晨岳2 小时前
CentOS 安装 JDK+ NGINX+ Tomcat + Redis + MySQL搭建项目环境
java·redis·mysql·nginx·centos·tomcat
ζั͡山 ั͡有扶苏 ั͡✾6 小时前
CentOS/RHEL LVM 磁盘扩展完整教程
linux·运维·centos
杰夫贾维斯1 天前
CentOS Linux 8 的系统部署 Qwen2.5-7B -Instruct-AWQ
linux·运维·人工智能·机器学习·centos
宛西南浪漫戈命1 天前
Centos 7下使用C++使用Rdkafka库实现生产者消费者
c++·centos·linq
hie988941 天前
CentOS环境搭建-快速升级G++版本
linux·python·centos
星辰云-1 天前
【超详细】CentOS系统Docker安装与配置一键脚本(附镜像加速配置)
linux·docker·centos
荔枝吻1 天前
【保姆级喂饭教程】GitLab创建用户规范,分支开发规范,提交日志规范
gitlab·git规范·分支规范
云畅新视界1 天前
从 CODING 停服到极狐 GitLab “接棒”,软件研发工具市场风云再起
人工智能·gitlab
hwj运维之路1 天前
GitOps实践指南:GitLab CI/CD + ArgoCD 实现 Kubernetes 自动化部署
ci/cd·gitlab·argocd
vvw&2 天前
Linux 中的 .bashrc 是什么?配置详解
linux·运维·服务器·chrome·后端·ubuntu·centos