开启gitlab中远程连接pgsql

1、修改gitlab.rb

vim /etc/gitlab/gitlab.rb

配置为:

postgresql'enable' = true

postgresql'listen_address' = '0.0.0.0'

postgresql'port' = 5432

postgresql'data_dir' = "/var/opt/gitlab/postgresql/data"

2、gitlab-ctl reconfigure 等待报错

3、修改pg_hba.conf

vim /var/opt/gitlab/postgresql/data/pg_hba.conf

注释Local行、增加下面行

host all all 0.0.0.0/0 trust

4、gitlab-ctl restart

5、连接gitlabhq_production、用户名gitlab

附:本地连接命令

复制代码
sudo gitlab-rake gitlab:env:info

-sh-4.2$ psql -h /var/opt/gitlab/postgresql -d gitlabhq_production
相关推荐
puamac1 天前
GitLab CI/CD 指南
gitlab
Rain5091 天前
GitLab-Runner + AI 代码审查服务 + 远程大模型 全套部署运维实战
linux·运维·人工智能·python·ci/cd·gitlab·ai编程
puamac2 天前
gitLab CI/CD 执行流程说明
ci/cd·gitlab
维度跃迁笔记2 天前
2核4G轻量服务器部署GitLab实战:配置调优与CI/CD拆分方案
服务器·ci/cd·gitlab
Byron Loong3 天前
GitLab 全部权限角色详解
gitlab
Cat_Rocky3 天前
Gitlab安装与配置
linux·运维·gitlab
D4c-lovetrain3 天前
CentOS9 GitLab 完整配置全流程
gitlab
puamac3 天前
GitLab CI/CD 故障排查手册
ci/cd·gitlab
Aubrey-J4 天前
老版本Gitlab SSL证书自动续期错误KeyError: key not found: “token“解决
网络协议·gitlab·ssl
java_logo5 天前
Docker 部署 GitLab CE 完整版教程
docker·容器·gitlab·gitlab docker部署·gitlab部署文档·gitlab部署·gitlab部署教程