在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 ` 使配置生效)
相关推荐
欧云服务器4 天前
怎么让脚本命令可以同时在centos、debian、ubuntu执行?
ubuntu·centos·debian
xiaoliuliu123454 天前
CentOS 7 安装 gcc-4.8.5-44.el7.x86_64.rpm 详细步骤(含依赖解决)
linux·运维·centos
txzz88884 天前
CentOS-Stream-10 Secure Shell服务器sshd_config配置文件
linux·centos·sshd_config·ssh配置
Aliex_git4 天前
Dockerfile 优化实践笔记
笔记·学习·gitlab
txzz88884 天前
CentOS-Stream-10 Secure Shell服务器
linux·centos·ssh·secure shell·ssh服务器
成为你的宁宁5 天前
Jenkins 自动化部署前后端分离若依项目全攻略:涵盖环境配置、Maven/Node.js 工具安装、GitLab 项目协同,及前后端构建、服务器推送与代码更新验证全步骤
node.js·自动化·gitlab·jenkins·maven
文静小土豆5 天前
CentOS 7 OpenSSH 10.2p1 升级全攻略(含离线安装与回退方案)
linux·运维·centos·ssh
xianyudx5 天前
Linux 服务器 DNS 配置指南 (CentOS 7 / 麒麟 V10)
linux·服务器·centos
文静小土豆5 天前
CentOS 7 升级 OpenSSL 3.5.4 详细指南
linux·运维·centos·ssl
sunshinebo5 天前
一次 GitLab 无法启动的排查:Docker 日志把 500G 磁盘打满
docker·eureka·gitlab