加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Postgresql – 用于Postgres的GitLab Omnibus配置

发布时间:2020-12-13 16:32:57 所属栏目:百科 来源:网络整理
导读:我正在我的开发Debian 7(Wheezy)机器上安装gitlab_6.8.1-omnibus.4-1_amd64.deb,其中Postgres 9.1已经安装. 当我运行sudo gitlab-ctl重新配置我抓到一个错误: Error executing action `run` on resource 'execute[migrate database]' =====================
我正在我的开发Debian 7(Wheezy)机器上安装gitlab_6.8.1-omnibus.4-1_amd64.deb,其中Postgres 9.1已经安装.

当我运行sudo gitlab-ctl重新配置我抓到一个错误:

Error executing action `run` on resource 'execute[migrate database]'
    ======================================================================

    Mixlib::ShellOut::ShellCommandFailed  
------------------------------------
Expected process to exit with [0],but received '1'
---- Begin output of /opt/gitlab/bin/gitlab-rake db:migrate ----
STDOUT:
STDERR: WARNING: Nokogiri was built against LibXML version 2.8.0,but has dynamically loaded 2.7.8
rake aborted!
FATAL:  password authentication failed for user "gitlab"
FATAL:  password authentication failed for user "gitlab"

我在Postgres中创建了两个用户git和gitlab(密码为git和gitlab),但没有帮助.

/var/log/postgresql/postgresql-9.1-main.log充满了认证错误:

2014-05-10 14:51:30 MSK FATAL:  password authentication failed for user "gitlab"

如何配置PostgreSQL选项来安装GitLab Omnibus?

我解决了我现有的PostgreSQL实例的问题.

>添加到/etc/gitlab/gitlab.rb:

# Disable the built-in Postgres
postgresql['enable'] = false

gitlab_rails['db_adapter'] = 'postgresql'
gitlab_rails['db_encoding'] = 'unicode'
# Create database manually and place its name here.
gitlab_rails['db_database'] = 'gitlabhq_production'
gitlab_rails['db_host'] = '127.0.0.1'
gitlab_rails['db_port'] = '5432'
gitlab_rails['db_username'] = 'git' # Database owner.
gitlab_rails['db_password'] = 'git' # Database owner's password.

>运行sudo gitlab-ctl重新配置.
>导入默认数据:

sudo gitlab-rake gitlab:setup

替代方案是设置定制端口用于内置PostgreSQL:

postgresql['enable'] = true
    postgresql['port'] = 5433

这将在指定端口上运行单独的PostgreSQL实例.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读