Commit 4b4dc9e483521c660da97ce8263a42f45f3dec52
1 parent
23bf72dc
Exists in
master
and in
4 other branches
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 | 1. install packeges. | 30 | 1. install packeges. |
7 | 2. install ruby | 31 | 2. install ruby |
@@ -10,21 +34,23 @@ | @@ -10,21 +34,23 @@ | ||
10 | 5. server up. | 34 | 5. server up. |
11 | 6. run resque process (for processing queue). | 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 | # 1. Install packages | 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 | sudo apt-get update | 55 | sudo apt-get update |
30 | sudo apt-get upgrade | 56 | sudo apt-get upgrade |
@@ -65,7 +91,7 @@ Add your user to git group: | @@ -65,7 +91,7 @@ Add your user to git group: | ||
65 | Generate key: | 91 | Generate key: |
66 | sudo -H -u gitlab ssh-keygen -q -N '' -t rsa -f /home/gitlab/.ssh/id_rsa | 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 | cd /home/git | 95 | cd /home/git |
70 | sudo -H -u git git clone git://github.com/gitlabhq/gitolite /home/git/gitolite | 96 | sudo -H -u git git clone git://github.com/gitlabhq/gitolite /home/git/gitolite |
71 | 97 | ||
@@ -89,7 +115,8 @@ Permissions: | @@ -89,7 +115,8 @@ Permissions: | ||
89 | # if succeed you can remove it | 115 | # if succeed you can remove it |
90 | sudo rm -rf /tmp/gitolite-admin | 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 | # 4. Install gitlab and configuration. Check status configuration. | 121 | # 4. Install gitlab and configuration. Check status configuration. |
95 | 122 | ||
@@ -110,6 +137,7 @@ Permissions: | @@ -110,6 +137,7 @@ Permissions: | ||
110 | # Or | 137 | # Or |
111 | # Mysql | 138 | # Mysql |
112 | sudo -u gitlab cp config/database.yml.example config/database.yml | 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 | #### Install gems | 142 | #### Install gems |
115 | sudo -u gitlab -H bundle install --without development test --deployment | 143 | sudo -u gitlab -H bundle install --without development test --deployment |
@@ -136,16 +164,16 @@ Checking status: | @@ -136,16 +164,16 @@ Checking status: | ||
136 | Can clone gitolite-admin?............YES | 164 | Can clone gitolite-admin?............YES |
137 | UMASK for .gitolite.rc is 0007? ............YES | 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 | # 5. Server up | 169 | # 5. Server up |
143 | 170 | ||
144 | -Сервер можно запустить простой командой: | 171 | +Application can be started with next command: |
172 | + # For test purposes | ||
145 | sudo -u gitlab bundle exec rails s -e production | 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 | # 6. Run resque process (for processing queue). | 178 | # 6. Run resque process (for processing queue). |
151 | 179 | ||
@@ -155,6 +183,10 @@ If you have all YES then go next. | @@ -155,6 +183,10 @@ If you have all YES then go next. | ||
155 | # Gitlab start script | 183 | # Gitlab start script |
156 | ./resque.sh | 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 | # Nginx && Unicorn | 190 | # Nginx && Unicorn |
159 | 191 | ||
160 | ### Install Nginx | 192 | ### Install Nginx |
@@ -166,11 +198,11 @@ If you have all YES then go next. | @@ -166,11 +198,11 @@ If you have all YES then go next. | ||
166 | sudo -u gitlab cp config/unicorn.rb.orig config/unicorn.rb | 198 | sudo -u gitlab cp config/unicorn.rb.orig config/unicorn.rb |
167 | sudo -u gitlab unicorn_rails -c config/unicorn.rb -E production -D | 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 | upstream gitlab { | 203 | upstream gitlab { |
171 | server unix:/tmp/gitlab.socket; | 204 | server unix:/tmp/gitlab.socket; |
172 | } | 205 | } |
173 | -И добавим virtual host: | ||
174 | 206 | ||
175 | server { | 207 | server { |
176 | listen 80; | 208 | listen 80; |
@@ -189,8 +221,10 @@ If you have all YES then go next. | @@ -189,8 +221,10 @@ If you have all YES then go next. | ||
189 | } | 221 | } |
190 | 222 | ||
191 | mygitlab.com - change to your domain. | 223 | mygitlab.com - change to your domain. |
224 | + | ||
192 | Restart nginx: | 225 | Restart nginx: |
193 | /etc/init.d/nginx restart | 226 | /etc/init.d/nginx restart |
227 | + | ||
194 | Create init script in /etc/init.d/gitlab: | 228 | Create init script in /etc/init.d/gitlab: |
195 | #! /bin/bash | 229 | #! /bin/bash |
196 | ### BEGIN INIT INFO | 230 | ### BEGIN INIT INFO |
@@ -250,3 +284,5 @@ Adding permission: | @@ -250,3 +284,5 @@ Adding permission: | ||
250 | When server is rebooted then gitlab must starting: | 284 | When server is rebooted then gitlab must starting: |
251 | sudo update-rc.d gitlab defaults | 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 |