Commit 1d15586f authored by Mike TUMS's avatar Mike TUMS

Update doc/install/databases.md

Update docs for PostgreSQL installation
parent 404040d7
...@@ -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
## PostgreSQL ## PostgreSQL
sudo apt-get install -y postgresql-9.2 postgresql-server-dev-9.2 sudo apt-get install -y postgresql-9.1 postgresql-server-dev-9.1
# Connect to database server # Connect to database server
sudo -u postgres psql -d template1 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
# Add a user called gitlab. Change $password to a real password # Add a user called gitlab. Change $password to a real password
template1=# CREATE USER gitlab WITH PASSWORD '$password'; template1=# CREATE USER gitlab WITH PASSWORD '$password';
# Create the GitLab production database # Create the GitLab production database & grant all privileges on database
template1=# CREATE DATABASE IF NOT EXISTS gitlabhq_production; template1=# CREATE DATABASE gitlabhq_production OWNER gitlab;
# Grant all privileges on database
template1=# GRANT ALL PRIVILEGES ON DATABASE gitlabhq_production to gitlab;
# Quit from PostgreSQL server # Quit from PostgreSQL server
template1=# \q template1=# \q
# Try connect to new database # Try connect to new database
$ su - gitlab sudo -u gitlab psql -d gitlabhq_production
$ psql -d gitlabhq_production -U gitlab
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment