Commit 5ff6fadcc1fc4588485d34a06c7e27d8b6f302c4
Committed by
Dmitriy Zaporozhets
1 parent
c8fe07ed
Exists in
master
and in
4 other branches
refactor installation doc
Showing
1 changed file
with
33 additions
and
19 deletions
Show diff stats
doc/installation.md
... | ... | @@ -51,12 +51,13 @@ The basic installation will provide you a GitLab setup with options: |
51 | 51 | |
52 | 52 | The installation consists of next steps: |
53 | 53 | |
54 | -1. packages / dependencies | |
55 | -2. ruby | |
56 | -3. gitolite | |
57 | -4. mysql | |
58 | -5. GitLab. | |
59 | -6. nginx | |
54 | +1. Packages / dependencies | |
55 | +2. Ruby | |
56 | +3. Users | |
57 | +4. Gitolite | |
58 | +5. Mysql | |
59 | +6. GitLab. | |
60 | +7. Nginx | |
60 | 61 | |
61 | 62 | |
62 | 63 | # 1. Install packages |
... | ... | @@ -72,6 +73,9 @@ Now install the required packages: |
72 | 73 | |
73 | 74 | sudo apt-get install -y wget curl gcc checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libreadline6-dev libc6-dev libssl-dev libmysql++-dev make build-essential zlib1g-dev libicu-dev redis-server openssh-server git-core python-dev python-pip libyaml-dev postfix libpq-dev |
74 | 75 | |
76 | + sudo pip install pygments | |
77 | + | |
78 | + | |
75 | 79 | # 2. Install Ruby |
76 | 80 | |
77 | 81 | wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz |
... | ... | @@ -81,7 +85,7 @@ Now install the required packages: |
81 | 85 | make |
82 | 86 | sudo make install |
83 | 87 | |
84 | -# 3. Install Gitolite | |
88 | +# 3. Users | |
85 | 89 | |
86 | 90 | Create user for git: |
87 | 91 | |
... | ... | @@ -111,6 +115,9 @@ Generate key: |
111 | 115 | |
112 | 116 | sudo -H -u gitlab ssh-keygen -q -N '' -t rsa -f /home/gitlab/.ssh/id_rsa |
113 | 117 | |
118 | + | |
119 | +# 4. Gitolite | |
120 | + | |
114 | 121 | Clone GitLab's fork of the Gitolite source code: |
115 | 122 | |
116 | 123 | sudo -H -u git git clone -b gl-v304 https://github.com/gitlabhq/gitolite.git /home/git/gitolite |
... | ... | @@ -134,8 +141,6 @@ Permissions: |
134 | 141 | sudo chmod -R g+rwX /home/git/repositories/ |
135 | 142 | sudo chown -R git:git /home/git/repositories/ |
136 | 143 | |
137 | -#### CHECK: Logout & login again to apply git group to your user | |
138 | - | |
139 | 144 | # clone admin repo to add localhost to known_hosts |
140 | 145 | # & be sure your user has access to gitolite |
141 | 146 | sudo -u gitlab -H git clone git@localhost:gitolite-admin.git /tmp/gitolite-admin |
... | ... | @@ -148,7 +153,7 @@ Check the [Trouble Shooting Guide](https://github.com/gitlabhq/gitlab-public-wik |
148 | 153 | and ensure you have followed all of the above steps carefully. |
149 | 154 | |
150 | 155 | |
151 | -# 4. Mysql database | |
156 | +# 5. Mysql database | |
152 | 157 | |
153 | 158 | sudo apt-get install -y mysql-server mysql-client libmysqlclient-dev |
154 | 159 | |
... | ... | @@ -165,13 +170,13 @@ and ensure you have followed all of the above steps carefully. |
165 | 170 | mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `gitlabhq_production`.* TO 'gitlab'@'localhost'; |
166 | 171 | |
167 | 172 | |
168 | -# 5. Clone GitLab source and install prerequisites | |
173 | +# 6. GitLab | |
169 | 174 | |
170 | - sudo gem install charlock_holmes --version '0.6.8' | |
171 | - sudo pip install pygments | |
172 | - sudo gem install bundler | |
173 | 175 | cd /home/gitlab |
174 | 176 | |
177 | + | |
178 | +#### Get source code | |
179 | + | |
175 | 180 | # Get gitlab code. Use this for stable setup |
176 | 181 | sudo -H -u gitlab git clone -b stable https://github.com/gitlabhq/gitlabhq.git gitlab |
177 | 182 | |
... | ... | @@ -179,6 +184,9 @@ and ensure you have followed all of the above steps carefully. |
179 | 184 | # Master branch (recent changes, less stable) |
180 | 185 | sudo -H -u gitlab git clone -b master https://github.com/gitlabhq/gitlabhq.git gitlab |
181 | 186 | |
187 | + | |
188 | +#### Copy configs | |
189 | + | |
182 | 190 | cd gitlab |
183 | 191 | |
184 | 192 | # Rename config files |
... | ... | @@ -190,16 +198,18 @@ and ensure you have followed all of the above steps carefully. |
190 | 198 | |
191 | 199 | #### Install gems |
192 | 200 | |
193 | - # mysql | |
201 | + cd /home/gitlab/gitlab | |
202 | + | |
203 | + sudo gem install charlock_holmes --version '0.6.8' | |
204 | + sudo gem install bundler | |
194 | 205 | sudo -u gitlab -H bundle install --without development test sqlite postgres --deployment |
195 | 206 | |
196 | -#### Setup database | |
207 | +#### Setup application | |
197 | 208 | |
198 | 209 | sudo -u gitlab bundle exec rake gitlab:app:setup RAILS_ENV=production |
199 | 210 | |
200 | 211 | #### Copy unicorn config |
201 | 212 | |
202 | - cd /home/gitlab/gitlab | |
203 | 213 | sudo -u gitlab cp config/unicorn.rb.example config/unicorn.rb |
204 | 214 | |
205 | 215 | #### Setup GitLab hooks |
... | ... | @@ -231,7 +241,7 @@ Checking status: |
231 | 241 | |
232 | 242 | If you got all YES - congratulations! You can run a GitLab app. |
233 | 243 | |
234 | -### init script | |
244 | +#### init script | |
235 | 245 | |
236 | 246 | Create init script in /etc/init.d/gitlab: |
237 | 247 | |
... | ... | @@ -242,7 +252,7 @@ GitLab autostart: |
242 | 252 | |
243 | 253 | sudo update-rc.d gitlab defaults 21 |
244 | 254 | |
245 | -### Now you should start GitLab application: | |
255 | +#### Now you should start GitLab application: | |
246 | 256 | |
247 | 257 | sudo service gitlab start |
248 | 258 | |
... | ... | @@ -276,6 +286,9 @@ You can login via web using admin generated with setup: |
276 | 286 | |
277 | 287 | # Advanced setup tips: |
278 | 288 | |
289 | + | |
290 | +## Quick setup | |
291 | + | |
279 | 292 | > - - - |
280 | 293 | > The first 3 steps of this guide can be easily skipped by executing an install script: |
281 | 294 | > |
... | ... | @@ -294,6 +307,7 @@ You can login via web using admin generated with setup: |
294 | 307 | > for more detailed instructions read the HOWTO section of [the script](https://github.com/gitlabhq/gitlab-recipes/blob/master/install/debian_ubuntu_aws.sh) |
295 | 308 | > - - - |
296 | 309 | |
310 | + | |
297 | 311 | ## Customizing Resque's Redis connection |
298 | 312 | |
299 | 313 | If you'd like Resque to connect to a Redis server on a non-standard port or on | ... | ... |