summaryrefslogtreecommitdiff
path: root/doc/install/installation.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/install/installation.md')
-rw-r--r--doc/install/installation.md95
1 files changed, 56 insertions, 39 deletions
diff --git a/doc/install/installation.md b/doc/install/installation.md
index 2b3e40034ad..6cad280acaf 100644
--- a/doc/install/installation.md
+++ b/doc/install/installation.md
@@ -36,17 +36,19 @@ The GitLab installation consists of setting up the following components:
`sudo` is not installed on Debian by default. Make sure your system is
up-to-date and install it.
- # run as root
- apt-get update
- apt-get upgrade
- apt-get install sudo
+ # run as root!
+ apt-get update -y
+ apt-get upgrade -y
+ apt-get install sudo -y
**Note:**
-Vim is an editor that is used here whenever there are files that need to be
-edited by hand. But, you can use any editor you like instead.
+During this installation some files will need to be edited manually.
+If you are familiar with vim set it as default editor with the commands below.
+If you are not familiar with vim please skip this and keep using the default editor.
- # Install vim
+ # Install vim and set as default editor
sudo apt-get install -y vim
+ sudo update-alternatives --set editor /usr/bin/vim.basic
Install the required packages:
@@ -55,7 +57,7 @@ Install the required packages:
Make sure you have the right version of Python installed.
# Install Python
- sudo apt-get install python
+ sudo apt-get install -y python
# Make sure that Python is 2.5+ (3.x is not supported at the moment)
python --version
@@ -73,15 +75,17 @@ Make sure you have the right version of Python installed.
mail server. By default, Debian is shipped with exim4 whereas Ubuntu
does not ship with one. The recommended mail server is postfix and you can install it with:
- sudo apt-get install postfix
+ sudo apt-get install -y postfix
+
+Then select 'Internet Site' and press enter to confirm the hostname.
# 2. Ruby
-Remove old 1.8 ruby if present
+Remove the old Ruby 1.8 if present
- sudo apt-get remove ruby1.8
+ sudo apt-get remove -y ruby1.8
-Download and compile it:
+Download Ruby and compile it:
mkdir /tmp/ruby && cd /tmp/ruby
curl --progress http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz | tar xz
@@ -92,7 +96,7 @@ Download and compile it:
Install the Bundler Gem:
- sudo gem install bundler
+ sudo gem install bundler --no-ri --no-rdoc
# 3. System Users
@@ -106,28 +110,25 @@ Create a `git` user for Gitlab:
GitLab Shell is a ssh access and repository management software developed specially for GitLab.
- # Login as git
- sudo su git
-
# Go to home directory
cd /home/git
# Clone gitlab shell
- git clone https://github.com/gitlabhq/gitlab-shell.git
+ sudo -u git -H git clone https://github.com/gitlabhq/gitlab-shell.git
cd gitlab-shell
# switch to right version
- git checkout v1.4.0
+ sudo -u git -H git checkout v1.4.0
- cp config.yml.example config.yml
+ sudo -u git -H cp config.yml.example config.yml
# Edit config and replace gitlab_url
# with something like 'http://domain.com/'
- vim config.yml
+ sudo -u git -H editor config.yml
# Do setup
- ./bin/install
+ sudo -u git -H ./bin/install
# 5. Database
@@ -149,11 +150,10 @@ To setup the MySQL/PostgreSQL database and dependencies please see [`doc/install
cd /home/git/gitlab
# Checkout to stable release
- sudo -u git -H git checkout 5-2-stable
+ sudo -u git -H git checkout 5-3-stable
**Note:**
-You can change `5-2-stable` to `master` if you want the *bleeding edge* version, but
-do so with caution!
+You can change `5-3-stable` to `master` if you want the *bleeding edge* version, but do so with caution!
## Configure it
@@ -164,7 +164,7 @@ do so with caution!
# Make sure to change "localhost" to the fully-qualified domain name of your
# host serving GitLab where necessary
- sudo -u git -H vim config/gitlab.yml
+ sudo -u git -H editor config/gitlab.yml
# Make sure GitLab can write to the log/ and tmp/ directories
sudo chown -R git log/
@@ -188,6 +188,10 @@ do so with caution!
# Copy the example Puma config
sudo -u git -H cp config/puma.rb.example config/puma.rb
+ # Enable cluster mode if you expect to have a high load instance
+ # Ex. change amount of workers to 3 for 2GB RAM server
+ sudo -u git -H editor config/puma.rb
+
# Configure Git global settings for git user, useful when editing via web
# Edit user.email according to what is set in gitlab.yml
sudo -u git -H git config --global user.name "GitLab"
@@ -201,10 +205,21 @@ Make sure to edit both `gitlab.yml` and `puma.rb` to match your setup.
# Mysql
sudo -u git cp config/database.yml.mysql config/database.yml
+ or
+
# PostgreSQL
sudo -u git 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.
+ # You only need to adapt the production settings (first part).
+ # If you followed the database guide then please do as follows:
+ # Change 'root' to 'gitlab'
+ # Change 'secure password' with the value you have given to $password
+ # You can keep the double quotes around the password
+ sudo -u git -H editor config/database.yml
+
+ # Make config/database.yml readable to git only
+ sudo -u git -H chmod o-rwx config/database.yml
## Install Gems
@@ -212,17 +227,21 @@ Make sure to update username/password in config/database.yml.
sudo gem install charlock_holmes --version '0.6.9.4'
- # For MySQL (note, the option says "without")
- sudo -u git -H bundle install --deployment --without development test postgres
+ # For MySQL (note, the option says "without ... postgres")
+ sudo -u git -H bundle install --deployment --without development test postgres unicorn aws
- # Or for PostgreSQL
- sudo -u git -H bundle install --deployment --without development test mysql
+ # Or for PostgreSQL (note, the option says "without ... mysql")
+ sudo -u git -H bundle install --deployment --without development test mysql unicorn aws
## Initialize Database and Activate Advanced Features
sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production
+ # Type 'yes' to create the database.
+
+ # When done you see 'Administrator account created:'
+
## Install Init Script
@@ -265,7 +284,7 @@ If you can't or don't want to use Nginx as your web server, have a look at the
[`Advanced Setup Tips`](./installation.md#advanced-setup-tips) section.
## Installation
- sudo apt-get install nginx
+ sudo apt-get install -y nginx
## Site Configuration
@@ -276,11 +295,9 @@ Download an example site config:
Make sure to edit the config file to match your setup:
- # **YOUR_SERVER_FQDN** to the fully-qualified
- # domain name of your host serving GitLab. Also, replace
- # the 'listen' line with the following:
- # listen 80 default_server; # e.g., listen 192.168.1.1:80;
- sudo vim /etc/nginx/sites-available/gitlab
+ # Change YOUR_SERVER_FQDN to the fully-qualified
+ # domain name of your host serving GitLab.
+ sudo editor /etc/nginx/sites-available/gitlab
## Restart
@@ -340,10 +357,10 @@ GitLab uses [Omniauth](http://www.omniauth.org/) for authentication and already
These steps are fairly general and you will need to figure out the exact details from the Omniauth provider's documentation.
-* Add `gem "omniauth-your-auth-provider"` to the [Gemfile](https://github.com/gitlabhq/gitlabhq/blob/5-2-stable/Gemfile#L18)
+* Add `gem "omniauth-your-auth-provider"` to the [Gemfile](https://github.com/gitlabhq/gitlabhq/blob/5-3-stable/Gemfile#L18)
* Run `sudo -u git -H bundle install` to install the new gem(s)
-* Add provider specific configuration options to your `config/gitlab.yml` (you can use the [auth providers section of the example config](https://github.com/gitlabhq/gitlabhq/blob/5-2-stable/config/gitlab.yml.example#L53) as a reference)
-* Add icons for the new provider into the [vendor/assets/images/authbuttons](https://github.com/gitlabhq/gitlabhq/tree/5-2-stable/vendor/assets/images/authbuttons) directory (you can find some more popular ones over at https://github.com/intridea/authbuttons)
+* Add provider specific configuration options to your `config/gitlab.yml` (you can use the [auth providers section of the example config](https://github.com/gitlabhq/gitlabhq/blob/5-3-stable/config/gitlab.yml.example#L53) as a reference)
+* Add icons for the new provider into the [vendor/assets/images/authbuttons](https://github.com/gitlabhq/gitlabhq/tree/5-3-stable/vendor/assets/images/authbuttons) directory (you can find some more popular ones over at https://github.com/intridea/authbuttons)
* Restart GitLab
### Examples