Skip to content

Commit 1d15586

Browse files
committed
Update doc/install/databases.md
Update docs for PostgreSQL installation
1 parent 404040d commit 1d15586

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

doc/install/databases.md

+4-8
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,22 @@ GitLab use mysql as default database but you are free to use PostgreSQL or SQLit
2626

2727
## PostgreSQL
2828

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
3030

3131
# Connect to database server
3232
sudo -u postgres psql -d template1
3333

3434
# Add a user called gitlab. Change $password to a real password
3535
template1=# CREATE USER gitlab WITH PASSWORD '$password';
3636

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;
4239

4340
# Quit from PostgreSQL server
4441
template1=# \q
4542

4643
# Try connect to new database
47-
$ su - gitlab
48-
$ psql -d gitlabhq_production -U gitlab
44+
sudo -u gitlab psql -d gitlabhq_production
4945

5046

5147

0 commit comments

Comments
 (0)