Commit 4b4dc9e483521c660da97ce8263a42f45f3dec52

Authored by Dmitriy Zaporozhets
1 parent 23bf72dc

en version

Showing 1 changed file with 59 additions and 23 deletions   Show diff stats
doc/installation.md
1   -Проект gitlab рассчитан на операционную систему Linux. Имеются сведения о успешной установке ее на FreeBSD и Mac OS, однако мы официально не тестируем на этих системах данный проект и не гарантируем его корректной работы.
2   -Данная интсрукция написана для систем Debian/Ubuntu.
  1 +## Platform requirements:
3 2  
4   -Установка проекта gitlab состоит из 6 частей:
  3 +**The project is designed for the Linux operating system. **
  4 +
  5 +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.
  6 +
  7 +We officially support next Linux Distributions:
  8 +
  9 +- Ubuntu
  10 +- Debian
  11 +
  12 +It should work on:
  13 +
  14 +- Fedora
  15 +- CentOs
  16 +- Red Hat
  17 +
  18 +It can work on:
  19 +
  20 + - Mac Os
  21 + - FreeBSD
  22 +
  23 +It 100% **wont** work on Windows
  24 +
  25 +
  26 +## This installation guide created for Debian/Ubuntu and properly tested.
  27 +
  28 +The installation consists of 6 steps:
5 29  
6 30 1. install packeges.
7 31 2. install ruby
... ... @@ -10,21 +34,23 @@
10 34 5. server up.
11 35 6. run resque process (for processing queue).
12 36  
13   -Большая просьба - прежде чем составлять отчет об ошибке убедитесь что все шаги вы проделали верно.
14   -
15   -Первые 3 шага возможно проделать автоматически, для этого установите curl:
16   - #для Debian может понадобиться установить утилиту sudo
17   - apt-get install curl sudo
18   -
19   - # 3 step in 1 command
20   - curl http://dl.dropbox.com/u/936096/debian_ubuntu.sh | sh
21   -
22   -Затем можно приступать к установке:
  37 +** Before submit an installation issue - please check if you followed all steps **
23 38  
  39 +> - - -
  40 +> First 3 steps can be easily skipped with simply install script:
  41 +>
  42 +> # Install curl and sudo
  43 +> apt-get install curl sudo
  44 +>
  45 +> # 3 steps in 1 command :)
  46 +> curl http://dl.dropbox.com/u/936096/debian_ubuntu.sh | sh
  47 +>
  48 +> Now you can go to step 4"
  49 +> - - -
24 50  
25 51 # 1. Install packages
26 52  
27   -*Имейте ввиду что в debian по умолчанию не установлена утилита sudo. Установите ее от юзера root:* **apt-get update && apt-get upgrade && apt-get install sudo**
  53 +*Keep in mind that `sudo` is not installed for debian by default. You should install it with as root:* **apt-get update && apt-get upgrade && apt-get install sudo**
28 54  
29 55 sudo apt-get update
30 56 sudo apt-get upgrade
... ... @@ -65,7 +91,7 @@ Add your user to git group:
65 91 Generate key:
66 92 sudo -H -u gitlab ssh-keygen -q -N '' -t rsa -f /home/gitlab/.ssh/id_rsa
67 93  
68   -получение исходников gitolite:
  94 +Get gitolite source code:
69 95 cd /home/git
70 96 sudo -H -u git git clone git://github.com/gitlabhq/gitolite /home/git/gitolite
71 97  
... ... @@ -89,7 +115,8 @@ Permissions:
89 115 # if succeed you can remove it
90 116 sudo rm -rf /tmp/gitolite-admin
91 117  
92   -Если вам не удалось успешно склонировать репозиторий - вы что-то сделали не так. Перепроверьте предидущие шаги. ДАЛЬНЕЙШАЯ УСТАНОВКА БУДЕТ БЕЗУСПЕШНА.
  118 +** IMPORTANT! If you cant clone `gitolite-admin` repository - DONT PROCEED INSTALLATION**
  119 +
93 120  
94 121 # 4. Install gitlab and configuration. Check status configuration.
95 122  
... ... @@ -110,6 +137,7 @@ Permissions:
110 137 # Or
111 138 # Mysql
112 139 sudo -u gitlab cp config/database.yml.example config/database.yml
  140 + # Change username/password of config/database.yml to real one
113 141  
114 142 #### Install gems
115 143 sudo -u gitlab -H bundle install --without development test --deployment
... ... @@ -136,16 +164,16 @@ Checking status:
136 164 Can clone gitolite-admin?............YES
137 165 UMASK for .gitolite.rc is 0007? ............YES
138 166  
139   -If you have all YES then go next.
140   -Поздравляем!!! установка завершена. Теперь необходимо запустить сервисы.
  167 +If you got all YES - congrats! You can go to next step.
141 168  
142 169 # 5. Server up
143 170  
144   -Сервер можно запустить простой командой:
  171 +Application can be started with next command:
  172 + # For test purposes
145 173 sudo -u gitlab bundle exec rails s -e production
146   -Однако этот способ даст вам только возможность проверить работоспособность сервиса, не более. Чтобы запустить сервис в виде демона, сделайте так
147   - sudo -u gitlab bundle exec rails s -e production -d
148 174  
  175 + # As daemon
  176 + sudo -u gitlab bundle exec rails s -e production -d
149 177  
150 178 # 6. Run resque process (for processing queue).
151 179  
... ... @@ -155,6 +183,10 @@ If you have all YES then go next.
155 183 # Gitlab start script
156 184 ./resque.sh
157 185  
  186 +
  187 +** Ok - we have a working application now. **
  188 +** But keep going - there are some thing that should be done **
  189 +
158 190 # Nginx && Unicorn
159 191  
160 192 ### Install Nginx
... ... @@ -166,11 +198,11 @@ If you have all YES then go next.
166 198 sudo -u gitlab cp config/unicorn.rb.orig config/unicorn.rb
167 199 sudo -u gitlab unicorn_rails -c config/unicorn.rb -E production -D
168 200  
169   -В nginx.conf добавим блок upstream в секцию http:
  201 +Edit /etc/nginx/nginx.conf. Add next code to **http** section:
  202 +
170 203 upstream gitlab {
171 204 server unix:/tmp/gitlab.socket;
172 205 }
173   -И добавим virtual host:
174 206  
175 207 server {
176 208 listen 80;
... ... @@ -189,8 +221,10 @@ If you have all YES then go next.
189 221 }
190 222  
191 223 mygitlab.com - change to your domain.
  224 +
192 225 Restart nginx:
193 226 /etc/init.d/nginx restart
  227 +
194 228 Create init script in /etc/init.d/gitlab:
195 229 #! /bin/bash
196 230 ### BEGIN INIT INFO
... ... @@ -250,3 +284,5 @@ Adding permission:
250 284 When server is rebooted then gitlab must starting:
251 285 sudo update-rc.d gitlab defaults
252 286  
  287 +Now you can start/restart/stop gitlab like:
  288 + sudo /etc/init.d/gitlab restart
... ...