2014-05-10 17 views
9

Tôi đang cố gắng cài đặt gitlab_6.8.1-omnibus.4-1_amd64.deb trên máy phát triển Debian 7 (Wheezy) của tôi nơi Postgres 9.1 đã được cài đặt.Cấu hình GitLab Omnibus cho Postgres

Khi tôi chạy sudo gitlab-ctl reconfigure tôi bắt một lỗi:

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" 

Tôi tạo ra cả người dùng gitgitlab (với mật khẩu gitgitlab) trong Postgres nhưng nó đã không giúp đỡ.

/var/log/postgresql/postgresql-9.1-main.log là đầy đủ các lỗi xác thực:

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

Làm thế nào tôi có thể cấu hình tùy chọn để cài đặt PostgreSQL GitLab Omnibus?

Trả lời

17

Tôi đã giải quyết được sự cố với phiên bản PostgreSQL hiện tại của mình.

  1. Thêm vào /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. 
    
  2. Run sudo gitlab-ctl reconfigure.

  3. nhập dữ liệu mặc định:

    sudo gitlab-rake gitlab:setup 
    

Alternative biến là để thiết lập cổng tùy chỉnh cho xây dựng trong PostgreSQL:

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

này sẽ chạy dụ PostgreSQL riêng biệt trên cổng xác định.

+0

Tôi đã theo dõi giải pháp của bạn. Cấu hình lại Gitlab chạy trơn tru. Nhưng thiết lập đã không diễn ra tốt đẹp. Nó liên quan đến Pgsql không xác thực phương thức nhận dạng máng của người dùng gilab. Bạn có lời khuyên nào cho tôi không? – under5hell

1

tôi đã có thể khắc phục vấn đề này bằng cách đổi tên thư mục postgres đã tồn tại trong thư mục/var/opt/gitlab thư mục:

[[email protected]:/var/opt/gitlab]# ls -l 
total 52 
drwx------ 2 git   root  4096 Dec 8 09:52 backups 
-rw------- 1 root   root   38 Dec 8 09:52 bootstrapped 
drwx------ 4 git   root  4096 Feb 20 2015 git-data 
drwxr-xr-x 3 git   root  4096 Dec 8 09:52 gitlab-ci 
drwxr-xr-x 8 git   root  4096 Dec 8 10:29 gitlab-rails 
drwx------ 2 git   root  4096 Dec 8 10:29 gitlab-shell 
drwxr-x--- 2 git   gitlab-www 4096 Dec 8 09:53 gitlab-workhorse 
drwx------ 3 root   root  4096 Dec 8 10:02 logrotate 
drwxr-x--- 8 root   gitlab-www 4096 Dec 8 10:06 nginx 
drwxr-xr-x 3 gitlab-psql root  4096 Dec 8 10:24 postgresql.org 
drwxr-x--- 2 gitlab-redis git  4096 Dec 8 10:29 redis 

Sau đó, tôi chỉ reran lệnh gitlab-ctl reconfigure mà sau đó chạy thành công.

+0

Làm việc cho tôi. Cảm ơn. –

Các vấn đề liên quan