Commit 1d15586fee7b3bcb773db702e571b2453d107aca
1 parent
404040d7
Exists in
master
and in
4 other branches
Update doc/install/databases.md
Update docs for PostgreSQL installation
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 | 26 | |
27 | 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 | 31 | # Connect to database server |
32 | 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 | 34 | # Add a user called gitlab. Change $password to a real password |
35 | 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 | 40 | # Quit from PostgreSQL server |
44 | 41 | template1=# \q |
45 | 42 | |
46 | 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 | ... | ... |