1. 查看 gitlab 服务状态(最推荐)
sudo gitlab-ctl status
输出示例(正常运行):
run: gitaly: (pid 1234) 1234s; run: log: (pid 1230) 1235s run: gitlab-workhorse: (pid 1236) 1234s; run: log: (pid 1231) 1235s run: nginx: (pid 1237) 1234s; run: log: (pid 1232) 1235s run: postgresql: (pid 1238) 1234s; run: log: (pid 1233) 1235s run: redis: (pid 1239) 1234s; run: log: (pid 1234) 1235s run: sidekiq: (pid 1240) 1234s; run: log: (pid 1235) 1235s run: unicorn: (pid 1241) 1234s; run: log: (pid 1236) 1235s
run:= 正常运行down:= 已停止
只看汇总简化输出:
sudo gitlab-ctl status | grep down
无输出代表全部组件正常。
2. 查看系统 systemd 服务
gitlab 整套托管在 gitlab-runsvdir:
systemctl status gitlab-runsvdir
active (running):gitlab 总服务已启动inactive (dead):完全关闭
3. 端口监听检测(验证 web 服务可访问)
默认 gitlab 使用 80/443 端口:
# 查看80、443端口监听 ss -tlnp | grep -e "80|443"
看到 nginx 进程即 web 服务正常。
4. 快速启停命令备用
# 启动 sudo gitlab-ctl start # 停止 sudo gitlab-ctl stop # 重启 sudo gitlab-ctl restart # 重载配置(改gitlab.rb后执行) sudo gitlab-ctl reconfigure
5. 源码部署 gitlab(非 omnibus 安装,极少用)
如果是手动源码编译,用:
# 检查 unicorn/puma、redis、postgresql、nginx 进程 ps aux | grep -e "unicorn|puma|redis|postgres"
补充:判断机器是否安装过 gitlab
# 存在配置文件即代表已安装 ls /etc/gitlab/gitlab.rb
文件不存在 = 未安装 gitlab。
到此这篇关于ubuntu系统上gitlab是否开启的检查方法的文章就介绍到这了,更多相关检查ubuntu gitlab是否开启内容请搜索代码网以前的文章或继续浏览下面的相关文章希望大家以后多多支持代码网!
发表评论