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、gitlabctreconfigure 等待报错

3、修改pg_hba.conf

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

注释Local行、增加下面行

host   all    all    0.0.0.0/0    trust

4、gitlabctl   restart

5、连接gitlabhq_production用户名gitlab

附:本地连接命令

sudo gitlab-rake gitlab:env:info

-sh-4.2$ psql -h /var/opt/gitlab/postgresql -d gitlabhq_production

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注