Commit fa203e8b67b3e8fd25ab1edd0ccbedc6072563b2

Authored by Riyad Preukschas
1 parent b48852e7

Update installation docs to reduce the amount of possible errors

Closes #2080
Fixes #2264
Showing 1 changed file with 21 additions and 7 deletions   Show diff stats
doc/install/installation.md
... ... @@ -32,15 +32,24 @@ The GitLab installation consists of setting up th following components:
32 32  
33 33 # 1. Packages / Dependencies
34 34  
35   -*Keep in mind that `sudo` is not installed on Debian by default. You should install it as root:*
  35 +`sudo` is not installed on Debian by default. If you don't have it you'll need
  36 +to install it first.
36 37  
37   - apt-get update && apt-get upgrade && apt-get install sudo
  38 + # run as root
  39 + apt-get update && apt-get upgrade && apt-get install sudo vim
38 40  
39 41 Make sure your system is up-to-date:
40 42  
41 43 sudo apt-get update
42 44 sudo apt-get upgrade
43 45  
  46 +**Note:**
  47 +Vim is an editor that is used here whenever there are files that need to be
  48 +edited by hand. But, you can use any editor you like instead.
  49 +
  50 + # Install vim
  51 + sudo apt-get install -y vim
  52 +
44 53 Install the required packages:
45 54  
46 55 sudo apt-get install -y wget curl build-essential checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libreadline6-dev libc6-dev libssl-dev zlib1g-dev libicu-dev redis-server openssh-server git-core libyaml-dev postfix
... ... @@ -65,6 +74,8 @@ Make sure you have the right version of Python installed.
65 74  
66 75 # 2. Ruby
67 76  
  77 +Download and compile it:
  78 +
68 79 wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.gz
69 80 tar xfvz ruby-1.9.3-p327.tar.gz
70 81 cd ruby-1.9.3-p327
... ... @@ -72,6 +83,10 @@ Make sure you have the right version of Python installed.
72 83 make
73 84 sudo make install
74 85  
  86 +Install the Bundler Gem:
  87 +
  88 + sudo gem install bundler
  89 +
75 90  
76 91 # 3. System Users
77 92  
... ... @@ -101,6 +116,7 @@ Create a user for GitLab:
101 116  
102 117 Clone GitLab's fork of the Gitolite source code:
103 118  
  119 + cd /home/git
104 120 sudo -u git -H git clone -b gl-v304 https://github.com/gitlabhq/gitolite.git /home/git/gitolite
105 121  
106 122 Setup Gitolite with GitLab as its admin:
... ... @@ -109,16 +125,15 @@ Setup Gitolite with GitLab as its admin:
109 125 GitLab assumes *full and unshared* control over this Gitolite installation.
110 126  
111 127 # Add Gitolite scripts to $PATH
112   - cd /home/git
113   - sudo -u git -H mkdir bin
114   - sudo -u git -H sh -c 'echo -e "PATH=\$PATH:/home/git/bin\nexport PATH" >> /home/git/.profile'
  128 + sudo -u git -H mkdir /home/git/bin
  129 + sudo -u git -H sh -c 'printf "%b\n%b\n" "PATH=\$PATH:/home/git/bin" "export PATH" >> /home/git/.profile'
115 130 sudo -u git -H sh -c 'gitolite/install -ln /home/git/bin'
116 131  
117 132 # Copy the gitlab user's (public) SSH key ...
118 133 sudo cp /home/gitlab/.ssh/id_rsa.pub /home/git/gitlab.pub
119 134 sudo chmod 0444 /home/git/gitlab.pub
120 135  
121   - # ... and use it as the Gitolite admin key for setup
  136 + # ... and use it as the admin key for the Gitolite setup
122 137 sudo -u git -H sh -c "PATH=/home/git/bin:$PATH; gitolite setup -pk /home/git/gitlab.pub"
123 138  
124 139 Fix the directory permissions for the repository:
... ... @@ -183,7 +198,6 @@ Make sure to edit both files to match your setup.
183 198 cd /home/gitlab/gitlab
184 199  
185 200 sudo gem install charlock_holmes --version '0.6.9'
186   - sudo gem install bundler
187 201 sudo -u gitlab -H bundle install --deployment --without development test
188 202  
189 203 ## Configure Git
... ...