Commit dfc5adfc authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #2188 from riyad/update-installation-docs

Update installation docs
parents 12b4bb59 d8a239e4
#
# PRODUCTION
#
production:
adapter: mysql2
encoding: utf8
reconnect: false
database: gitlabhq_production
pool: 5
username: root
password: "secure password"
# host: localhost
# socket: /tmp/mysql.sock
#
# Development specific
#
development:
adapter: mysql2
encoding: utf8
reconnect: false
database: gitlabhq_development
pool: 5
username: root
password: "secure password"
# socket: /tmp/mysql.sock
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test: &test
adapter: mysql2
encoding: utf8
reconnect: false
database: gitlabhq_test
pool: 5
username: root
password: "secure password"
# socket: /tmp/mysql.sock
# Databases: # Setup Database
GitLab use MySQL as default database but you are free to use PostgreSQL. GitLab supports the following databases:
* MySQL (preferred)
* PostgreSQL
## MySQL ## MySQL
# Install the database packages
sudo apt-get install -y mysql-server mysql-client libmysqlclient-dev sudo apt-get install -y mysql-server mysql-client libmysqlclient-dev
# Install only the necessary gems
sudo -u gitlab -H bundle install --deployment --without development test postgres
# Login to MySQL # Login to MySQL
$ mysql -u root -p $ mysql -u root -p
# Create a user for GitLab. (change $password to a real password)
mysql> CREATE USER 'gitlab'@'localhost' IDENTIFIED BY '$password';
# Create the GitLab production database # Create the GitLab production database
mysql> CREATE DATABASE IF NOT EXISTS `gitlabhq_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`; mysql> CREATE DATABASE IF NOT EXISTS `gitlabhq_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
# Create the MySQL User change $password to a real password # Grant the GitLab user necessary permissopns on the table.
mysql> CREATE USER 'gitlab'@'localhost' IDENTIFIED BY '$password';
# Grant proper permissions to the MySQL User
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `gitlabhq_production`.* TO 'gitlab'@'localhost'; mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `gitlabhq_production`.* TO 'gitlab'@'localhost';
# Quit the database session
mysql> \q
# Try connecting to the new database with the new user
sudo -u gitlab -H mysql -u gitlab -p -D gitlabhq_production
## PostgreSQL ## PostgreSQL
sudo apt-get install -y postgresql-9.1 postgresql-server-dev-9.1 # Install the database packages
sudo apt-get install -y postgresql-9.1 libpq-dev
# Install only the necessary gems
sudo -u gitlab -H bundle install --deployment --without development test mysql
# Connect to database server # Login to PostgreSQL
sudo -u postgres psql -d template1 sudo -u postgres psql -d template1
# Add a user called gitlab. Change $password to a real password # Create a user for 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 & grant all privileges on database # Create the GitLab production database & grant all privileges on database
template1=# CREATE DATABASE gitlabhq_production OWNER gitlab; template1=# CREATE DATABASE gitlabhq_production OWNER gitlab;
# Quit from PostgreSQL server # Quit the database session
template1=# \q template1=# \q
# Try connect to new database # Try connecting to the new database with the new user
sudo -u gitlab psql -d gitlabhq_production sudo -u gitlab -H psql -d gitlabhq_production
#### Select the database you want to use # Configure GitLab
# Mysql # Mysql
sudo -u gitlab cp config/database.yml.mysql config/database.yml sudo -u gitlab cp config/database.yml.mysql config/database.yml
...@@ -49,12 +65,4 @@ GitLab use MySQL as default database but you are free to use PostgreSQL. ...@@ -49,12 +65,4 @@ GitLab use MySQL as default database but you are free to use PostgreSQL.
# PostgreSQL # PostgreSQL
sudo -u gitlab cp config/database.yml.postgresql config/database.yml sudo -u gitlab cp config/database.yml.postgresql config/database.yml
# make sure to update username/password in config/database.yml Make sure to update username/password in config/database.yml.
#### Install gems
# mysql
sudo -u gitlab -H bundle install --without development test postgres --deployment
# or postgres
sudo -u gitlab -H bundle install --without development test mysql --deployment
This diff is collapsed.
## Platform requirements: # Hardware
**The project is designed for the Linux operating system.** We recommend you to run GitLab on a server with at least 1GB RAM.
It may work on FreeBSD and Mac OS, but we don't test our application for these systems and can't guarantee stability and full functionality. The necessary hard disk space largely depends on the size of the repos you want
to use GitLab with. But as a *rule of thumb* you should have at least as much
free space as your all repos combined take up.
We officially support (recent versions of) these Linux distributions:
# Operating Systems
## Linux
GitLab is developed for the Linux operating system.
GitLab officially supports (recent versions of) these Linux distributions:
- Ubuntu Linux - Ubuntu Linux
- Debian/GNU Linux - Debian/GNU Linux
It should work on: It should also work on (though they are not officially supported):
- Arch
- CentOS
- Fedora - Fedora
- CentOs - Gentoo
- RedHat - RedHat
You might have some luck using these, but no guarantees: ## Other Unix Systems
There is nothing that prevents GitLab from running on other Unix operating
systems. This means you may get it to work on systems running FreeBSD or OS X.
**If you want to try, please proceed with caution!**
## Windows
GitLab does **not** run on Windows and we have no plans of supporting it in the
near future.
# Rubies
- FreeBSD will likely work, see https://github.com/gitlabhq/gitlabhq/issues/796 GitLab requires Ruby (MRI) 1.9.3 and several Gems with native components.
- MacOS X will likely work, see https://groups.google.com/forum/#!topic/gitlabhq/5IXHbPkjKLA While it is generally possible to use other Rubies (like
[JRuby](http://jruby.org/) or [Rubinius](http://rubini.us/)) it might require
some work on your part.
GitLab does **not** run on Windows and we have no plans of making GitLab compatible.
## Hardware: # Installation troubles and reporting success or failure
We recommend to use server with at least 1GB RAM for gitlab instance. If you have troubles installing GitLab following the official installation guide
or want to share your experience installing GitLab on a not officially supported
platform, please follow the the contribution guide (see CONTRIBUTING.md).
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