当前位置: 首页 > ops >正文

在腾讯云上安装gitlab

系统配置建议:最低双核 4G 内存。

腾讯云的opencloudos,其实是centos改版来的。

[root@VM-4-13-opencloudos ~]# yum install -y gitlab-ce 
Last metadata expiration check: 0:26:43 ago on Tue 22 Jul 2025 08:30:16 PM CST.
Error: Problem: cannot install the best candidate for the job- nothing provides policycoreutils-python needed by gitlab-ce-17.1.1-ce.0.el7.x86_64 from gitlab-ce
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
[root@VM-4-13-opencloudos ~]# yum install -y gitlab-ce --skip-broken 
Last metadata expiration check: 0:27:03 ago on Tue 22 Jul 2025 08:30:16 PM CST.
Dependencies resolved.Problem: cannot install the best candidate for the job- nothing provides policycoreutils-python needed by gitlab-ce-17.1.1-ce.0.el7.x86_64 from gitlab-ce
==============================================================================================================================================================================================================================================Package                                                  Architecture                                          Version                                                        Repository                                                Size
==============================================================================================================================================================================================================================================
Skipping packages with broken dependencies:gitlab-ce                                                x86_64                                                17.1.1-ce.0.el7                                                gitlab-ce                                                936 MTransaction Summary
==============================================================================================================================================================================================================================================
Skip  1 PackageNothing to do.
Complete!
[root@VM-4-13-opencloudos ~]# yum install -y gitlab-ce --skip-broken 
Last metadata expiration check: 0:27:27 ago on Tue 22 Jul 2025 08:30:16 PM CST.
Dependencies resolved.Problem: cannot install the best candidate for the job- nothing provides policycoreutils-python needed by gitlab-ce-17.1.1-ce.0.el7.x86_64 from gitlab-ce
==============================================================================================================================================================================================================================================Package                                                  Architecture                                          Version                                                        Repository                                                Size
==============================================================================================================================================================================================================================================
Skipping packages with broken dependencies:gitlab-ce                                                x86_64                                                17.1.1-ce.0.el7                                                gitlab-ce                                                936 MTransaction Summary
==============================================================================================================================================================================================================================================
Skip  1 PackageNothing to do.
Complete!
[root@VM-4-13-opencloudos ~]# yum install policycoreutils-python-utils
Last metadata expiration check: 0:31:40 ago on Tue 22 Jul 2025 08:30:16 PM CST.
Package policycoreutils-python-utils-3.5-7.oc9.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[root@VM-4-13-opencloudos ~]# yum install -y gitlab-ce --skip-broken --skip-best 
usage: yum install [-c [config file]] [-q] [-v] [--version] [--installroot [path]] [--nodocs] [--noplugins] [--enableplugin [plugin]] [--disableplugin [plugin]] [--releasever RELEASEVER] [--setopt SETOPTS] [--skip-broken] [-h][--allowerasing] [-b | --nobest] [-C] [-R [minutes]] [-d [debug level]] [--debugsolver] [--showduplicates] [-e ERRORLEVEL] [--obsoletes] [--rpmverbosity [debug level name]] [-y] [--assumeno] [--enablerepo [repo]][--disablerepo [repo] | --repo [repo]] [--enable | --disable] [-x [package]] [--disableexcludes [repo]] [--repofrompath [repo,path]] [--noautoremove] [--nogpgcheck] [--color COLOR] [--refresh] [-4] [-6][--destdir DESTDIR] [--downloadonly] [--comment COMMENT] [--bugfix] [--enhancement] [--newpackage] [--security] [--advisory ADVISORY] [--bz BUGZILLA] [--cve CVES] [--sec-severity {Critical,Important,Moderate,Low}][--forcearch ARCH]PACKAGE [PACKAGE ...]
yum install: error: unrecognized arguments: --skip-best
[root@VM-4-13-opencloudos ~]# yum install -y gitlab-ce 
Last metadata expiration check: 0:33:30 ago on Tue 22 Jul 2025 08:30:16 PM CST.
Error: Problem: cannot install the best candidate for the job- nothing provides policycoreutils-python needed by gitlab-ce-17.1.1-ce.0.el7.x86_64 from gitlab-ce
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
[root@VM-4-13-opencloudos ~]# yum install -y gitlab-ce --skip-broken --nobest 
Last metadata expiration check: 0:33:41 ago on Tue 22 Jul 2025 08:30:16 PM CST.
Dependencies resolved.Problem: cannot install the best candidate for the job- nothing provides policycoreutils-python needed by gitlab-ce-17.1.1-ce.0.el7.x86_64 from gitlab-ce
==============================================================================================================================================================================================================================================Package                                                  Architecture                                          Version                                                        Repository                                                Size
==============================================================================================================================================================================================================================================
Installing:gitlab-ce                                                x86_64                                                9.5.10-ce.0.el7                                                gitlab-ce                                                381 M
Skipping packages with broken dependencies:gitlab-ce                                                x86_64                                                17.1.1-ce.0.el7                                                gitlab-ce                                                936 MTransaction Summary
==============================================================================================================================================================================================================================================
Install  1 Package
Skip     1 PackageTotal download size: 381 M
Installed size: 381 M
Downloading Packages:
gitlab-ce-9.5.10-ce.0.el7.x86_64.rpm                                                                                                                                                                           11 MB/s | 381 MB     00:34    
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                          11 MB/s | 381 MB     00:34     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transactionPreparing        :                                                                                                                                                                                                                      1/1 Running scriptlet: gitlab-ce-9.5.10-ce.0.el7.x86_64                                                                                                                                                                                     1/1 Installing       : gitlab-ce-9.5.10-ce.0.el7.x86_64                                                                                                                                                                                     1/1 Running scriptlet: gitlab-ce-9.5.10-ce.0.el7.x86_64                                                                                                                                                                                     1/1 *.                  *.***                 ********               *****.******             ***************            ********,,,,,,,,,***********,,,,,,,,,,,,,,,,,,,,*********,,,,,,,,,,,.,,,,,,,,,,,*******,,,,,,,,,,,,,,,,,,,,,*****,,,,,,,,,.,,,,,,,****,,,,,,.,,,***,,,,,*,._______ __  __          __/ ____(_) /_/ /   ____ _/ /_/ / __/ / __/ /   / __ `/ __ \/ /_/ / / /_/ /___/ /_/ / /_/ /\____/_/\__/_____/\__,_/_.___/gitlab: Thank you for installing GitLab!
gitlab: To configure and start GitLab, RUN THE FOLLOWING COMMAND:sudo gitlab-ctl reconfiguregitlab: GitLab should be reachable at http://VM-4-13-opencloudos
gitlab: Otherwise configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
gitlab: And running reconfigure again.
gitlab: 
gitlab: For a comprehensive list of configuration options please see the Omnibus GitLab readme
gitlab: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
gitlab: Verifying        : gitlab-ce-9.5.10-ce.0.el7.x86_64                                                                                                                                                                                     1/1 Installed:gitlab-ce-9.5.10-ce.0.el7.x86_64                                                                                                                                                                                                            
Skipped:gitlab-ce-17.1.1-ce.0.el7.x86_64                                                                                                                                                                                                            Complete!

[root@VM-4-13-opencloudos gitlab]# gitlab-ctl status 
run: gitaly: (pid 43605) 225s; run: log: (pid 28800) 1624s
run: gitlab-monitor: (pid 43618) 225s; run: log: (pid 29095) 1605s
run: gitlab-workhorse: (pid 43627) 224s; run: log: (pid 28832) 1622s
run: logrotate: (pid 43637) 224s; run: log: (pid 28949) 1614s
run: nginx: (pid 43680) 224s; run: log: (pid 28894) 1620s
run: node-exporter: (pid 43688) 223s; run: log: (pid 29009) 1612s
run: postgres-exporter: (pid 43695) 223s; run: log: (pid 29203) 1597s
run: postgresql: (pid 43706) 222s; run: log: (pid 22221) 2592s
run: prometheus: (pid 43714) 222s; run: log: (pid 29132) 1603s
run: redis: (pid 43730) 221s; run: log: (pid 22090) 2598s
run: redis-exporter: (pid 43734) 221s; run: log: (pid 29114) 1604s
run: sidekiq: (pid 43749) 219s; run: log: (pid 28743) 1630s
run: unicorn: (pid 43781) 218s; run: log: (pid 28696) 1632s

在各组件都启动的情况下,访问网址仍然打不开,查大模型,说是防火墙未开

sudo firewall-cmd --permanent --add-service=http   # 开放80端口
sudo firewall-cmd --permanent --add-service=https  # 开放443端口
sudo firewall-cmd --reload                         # 重载配置

查默认的80端口,发现竟然用的是8060

[root@VM-4-13-opencloudos gitlab]# netstat -tulnp | grep :80 
tcp        0      0 0.0.0.0:8060            0.0.0.0:*               LISTEN      39340/nginx: master 
tcp        0      0 127.0.0.1:8080          0.0.0.0:*               LISTEN      39472/unicorn maste 

改配置: 

sudo vi /etc/gitlab/gitlab.rb
nginx['listen_port'] = 80      # 明确指定80端口
nginx['listen_https'] = false  # 若未启用HTTPS则设为false

应用配置并重启: 

sudo gitlab-ctl reconfigure
sudo gitlab-ctl restart

http://www.xdnf.cn/news/16004.html

相关文章:

  • Qt开发环境搭建全攻略(Windows+Linux+macOS)
  • 【Altium Designer2025】电子设计自动化(EDA)软件——Altium Designer25版保姆级下载安装详细图文教程(附安装包)
  • 基于JAVA实现基于“obj--html--pdf” 的PDF格式文本生成
  • linux内核与GNU之间的联系和区别
  • 【QT常用技术讲解】QSystemTrayIcon系统托盘
  • 大模型——Data Agent:超越 BI 与 AI 的边界
  • 跨境企业破局国际市场:海外媒体发稿如何为品牌声誉赋能?
  • 算法笔记之堆排序
  • Docker实战:使用Docker部署TeamMapper思维导图工具
  • haproxy七层代理新手入门详解
  • EasyMan 数字人服务全面焕新,交互型AI数字人助推孪生体验全新升级
  • 大模型——上下文工程如何重塑智能体的“思考方式”
  • 【接口自动化】掌握接口自动化:核心概念讲解(理论知识)
  • Qt定时器与事件循环机制
  • C#初学知识点总结
  • 牛客:最长无重复子数组
  • 西门子 S7-1500分布式 I/O通信 :PROFINET IO 与 PROFIBUS DP核心技术详解(上)
  • Axios Token 设置示例
  • 洛谷刷题7..22
  • 《计算机“十万个为什么”》之 MQ
  • 图像基础:从像素到 OpenCV 的入门指南
  • Kafka单条消息长度限制详解及Java实战指南
  • 基于python django深度学习的中文文本检测+识别,可以前端上传图片和后台管理图片
  • 更具个性的域名:解锁互联网多元价值的钥匙
  • 【Godot4】工具栏组件ToolBar
  • 金仓数据库风云
  • 基于SpringBoot+MyBatis+MySQL+VUE实现的实习管理系统(附源码+数据库+毕业论文+项目部署视频教程+项目所需软件工具)
  • c练习-c基础
  • 【计算机网络】第五章:传输层
  • 查看 iOS iPhone 设备上 App 和系统运行时的实时日志与崩溃日志