Commit 92ac42a27c1251304f408fdff162999d0577a340

Authored by Andrey Kumanyaev
1 parent 75e6eb59

update doc

Showing 1 changed file with 40 additions and 1 deletions   Show diff stats
doc/installation.md
... ... @@ -75,6 +75,9 @@ Now install the required packages:
75 75 # If you want to use MySQL:
76 76 sudo apt-get install -y mysql-server mysql-client libmysqlclient-dev
77 77  
  78 + # If you want to use PostgreSQL:
  79 + sudo apt-get install -y postgresql-9.2 postgresql-server-dev-9.2
  80 +
78 81 # 2. Install Ruby
79 82  
80 83 wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz
... ... @@ -188,9 +191,45 @@ and ensure you have followed all of the above steps carefully.
188 191 # Exit MySQL Server and copy the example config, make sure to update username/password in config/database.yml
189 192 sudo -u gitlab cp config/database.yml.example config/database.yml
190 193  
  194 + # Or
  195 + # PostgreSQL
  196 + # Install PostgreSQL as directed in Step #1
  197 +
  198 + # Connect to database server
  199 + sudo -u postgres psql -d template1
  200 +
  201 + # Add a user called gitlab. Change $password to a real password
  202 + template1=# CREATE USER gitlab WITH PASSWORD '$password';
  203 +
  204 + # Create the GitLab production database
  205 + template1=# CREATE DATABASE IF NOT EXISTS gitlabhq_production;
  206 +
  207 + # Grant all privileges on database
  208 + template1=# GRANT ALL PRIVILEGES ON DATABASE gitlabhq_production to gitlab;
  209 +
  210 + # Quit from PostgreSQL server
  211 + template1=# \q
  212 +
  213 + # Try connect to new database
  214 + $ su - gitlab
  215 + $ psql -d gitlabhq_production -U gitlab
  216 +
  217 + # Exit PostgreSQL Server and copy the example config, make sure to update username/password in config/database.yml
  218 + sudo -u gitlab cp config/database.yml.postgres config/database.yml
  219 +
  220 + # If you need create development, test, staging or another database
  221 + # Repeate some steps with actual commands
  222 +
191 223 #### Install gems
192 224  
193   - sudo -u gitlab -H bundle install --without development test --deployment
  225 + # Please, check Gemfile before run bundle install
  226 + # Select database gem, wich you will use
  227 + # or run to setup gems with mysql usage
  228 + sudo -u gitlab -H bundle install --without development test sqlite postgres --deployment
  229 + # or postgres
  230 + sudo -u gitlab -H bundle install --without development test sqlite mysql --deployment
  231 + # or sqlite
  232 + sudo -u gitlab -H bundle install --without development test mysql postgres --deployment
194 233  
195 234 #### Setup database
196 235  
... ...