Commit 6d2e64164a46633afa7409461e4635834288e717

Authored by Dmitriy Zaporozhets
2 parents 404040d7 1d15586f

Merge pull request #1872 from mktums/patch-1

Update doc/install/databases.md
Showing 1 changed file with 4 additions and 8 deletions   Show diff stats
doc/install/databases.md
@@ -26,7 +26,7 @@ GitLab use mysql as default database but you are free to use PostgreSQL or SQLit @@ -26,7 +26,7 @@ GitLab use mysql as default database but you are free to use PostgreSQL or SQLit
26 26
27 ## PostgreSQL 27 ## PostgreSQL
28 28
29 - sudo apt-get install -y postgresql-9.2 postgresql-server-dev-9.2 29 + sudo apt-get install -y postgresql-9.1 postgresql-server-dev-9.1
30 30
31 # Connect to database server 31 # Connect to database server
32 sudo -u postgres psql -d template1 32 sudo -u postgres psql -d template1
@@ -34,18 +34,14 @@ GitLab use mysql as default database but you are free to use PostgreSQL or SQLit @@ -34,18 +34,14 @@ GitLab use mysql as default database but you are free to use PostgreSQL or SQLit
34 # Add a user called gitlab. Change $password to a real password 34 # Add a user called gitlab. Change $password to a real password
35 template1=# CREATE USER gitlab WITH PASSWORD '$password'; 35 template1=# CREATE USER gitlab WITH PASSWORD '$password';
36 36
37 - # Create the GitLab production database  
38 - template1=# CREATE DATABASE IF NOT EXISTS gitlabhq_production;  
39 -  
40 - # Grant all privileges on database  
41 - template1=# GRANT ALL PRIVILEGES ON DATABASE gitlabhq_production to gitlab; 37 + # Create the GitLab production database & grant all privileges on database
  38 + template1=# CREATE DATABASE gitlabhq_production OWNER gitlab;
42 39
43 # Quit from PostgreSQL server 40 # Quit from PostgreSQL server
44 template1=# \q 41 template1=# \q
45 42
46 # Try connect to new database 43 # Try connect to new database
47 - $ su - gitlab  
48 - $ psql -d gitlabhq_production -U gitlab 44 + sudo -u gitlab psql -d gitlabhq_production
49 45
50 46
51 47