2014-05-10 19 views
9

Sto cercando di installare gitlab_6.8.1-omnibus.4-1_amd64.deb sulla mia macchina Debian 7 (Wheezy) di sviluppo in cui Postgres 9.1 è già installato.Configurazione GitLab Omnibus per Postgres

Quando eseguo sudo gitlab-ctl reconfigure prendo un errore:

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" 

ho creato sia gli utenti git e gitlab (con password git e gitlab) in Postgres, ma non ha aiutato.

/var/log/postgresql/postgresql-9.1-main.log è pieno di errori di autenticazione:

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

Come posso configurare le opzioni per l'installazione di PostgreSQL GitLab Omnibus?

risposta

17

Ho risolto il problema con la mia istanza PostgreSQL esistente.

  1. Aggiungi a /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. Importare i dati di default:

    sudo gitlab-rake gitlab:setup 
    

variante alternativa è quella di impostare porta personalizzata per build-in PostgreSQL:

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

Questo farà eseguire esempio PostgreSQL separato sulla porta specificata.

+0

Ho seguito la vostra soluzione. La riconfigurazione di Gitlab viene eseguita senza intoppi. Ma l'installazione non è andata bene. Relativo a Pgsql non riesce ad autenticare il metodo ident di utente gilab attraverso. Avete qualche consiglio da darmi? – under5hell

1

sono stato in grado di risolvere questo problema rinominando la directory postgres che già esisteva in var/directory/opt/gitlab:

[[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 

Poi ho solo reran il comando gitlab-ctl reconfigure che poi ha funzionato con successo.

+0

ha funzionato per me. Grazie. –

Problemi correlati