开启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
相关推荐
GoodStudyAndDayDayUp12 小时前
gitlab私有化跑CICD
gitlab·gitlab私有化跑cicd
成为你的宁宁13 小时前
【Gitlab测试项目】
gitlab·devops
_可乐无糖3 天前
GitLab CI 脚本之 CI_COMMIT_AUTHOR
ci/cd·gitlab
_可乐无糖3 天前
GitLab CI 脚本之 dependencies 和 needs
ci/cd·gitlab
Fan_5585 天前
4核8G云服务器部署GitLab内存耗尽解决方案
gitlab
洋就在江州5 天前
gitlab-cicd 离线集成——springboot-cicd (非docker形式,shell形式)
java·spring boot·后端·ci/cd·gitlab·gitlab-runner
成为你的宁宁6 天前
【Ubuntu 18.04安装Gitlab】
ubuntu·gitlab
长春的KAKA6 天前
GitLab 项目页面报 500 错误的完整修复记录:PostgreSQL 数据库损坏、统计表缺失及数据库迁移
数据库·postgresql·gitlab
蓝胖的四次元口袋6 天前
GitLab知识梳理
gitlab
极小狐15 天前
CI 作业里 kubectl 连不上集群?用 Kubernetes Agent 打通部署链路的 7 个步骤
ci/cd·kubernetes·gitlab·devops·k8s部署