Commit f01d482427dd586c9b7b36887941e8af6bb42391
1 parent
70e80d95
Exists in
master
and in
4 other branches
Make the installation guide easier to follow for non-unix people.
Showing
3 changed files
with
53 additions
and
22 deletions
Show diff stats
doc/install/databases.md
@@ -8,13 +8,23 @@ GitLab supports the following databases: | @@ -8,13 +8,23 @@ GitLab supports the following databases: | ||
8 | 8 | ||
9 | ## MySQL | 9 | ## MySQL |
10 | 10 | ||
11 | + # If you are the git user log out since it doesn't have sudo rights | ||
12 | + exit | ||
13 | + | ||
11 | # Install the database packages | 14 | # Install the database packages |
12 | sudo apt-get install -y mysql-server mysql-client libmysqlclient-dev | 15 | sudo apt-get install -y mysql-server mysql-client libmysqlclient-dev |
13 | 16 | ||
17 | + # Pick a database root password (can be anything), type it and press enter | ||
18 | + # Retype the database root password and press enter | ||
19 | + | ||
14 | # Login to MySQL | 20 | # Login to MySQL |
15 | mysql -u root -p | 21 | mysql -u root -p |
16 | 22 | ||
17 | - # Create a user for GitLab. (change $password to a real password) | 23 | + # Type the database root password |
24 | + | ||
25 | + # Create a user for GitLab | ||
26 | + # do not type the 'mysql>', this is part of the prompt | ||
27 | + # change $password in the command below to a real password you pick | ||
18 | mysql> CREATE USER 'gitlab'@'localhost' IDENTIFIED BY '$password'; | 28 | mysql> CREATE USER 'gitlab'@'localhost' IDENTIFIED BY '$password'; |
19 | 29 | ||
20 | # Create the GitLab production database | 30 | # Create the GitLab production database |
@@ -29,6 +39,16 @@ GitLab supports the following databases: | @@ -29,6 +39,16 @@ GitLab supports the following databases: | ||
29 | # Try connecting to the new database with the new user | 39 | # Try connecting to the new database with the new user |
30 | sudo -u git -H mysql -u gitlab -p -D gitlabhq_production | 40 | sudo -u git -H mysql -u gitlab -p -D gitlabhq_production |
31 | 41 | ||
42 | + # Type the password you replaced $password with earlier | ||
43 | + | ||
44 | + # You should now see a 'mysql>' prompt | ||
45 | + | ||
46 | + # Quit the database session | ||
47 | + mysql> \q | ||
48 | + | ||
49 | + # You are done installing the database and can go back to the rest of the installation. | ||
50 | + | ||
51 | + | ||
32 | ## PostgreSQL | 52 | ## PostgreSQL |
33 | 53 | ||
34 | # Install the database packages | 54 | # Install the database packages |
doc/install/installation.md
@@ -36,10 +36,10 @@ The GitLab installation consists of setting up the following components: | @@ -36,10 +36,10 @@ The GitLab installation consists of setting up the following components: | ||
36 | `sudo` is not installed on Debian by default. Make sure your system is | 36 | `sudo` is not installed on Debian by default. Make sure your system is |
37 | up-to-date and install it. | 37 | up-to-date and install it. |
38 | 38 | ||
39 | - # run as root | ||
40 | - apt-get update | ||
41 | - apt-get upgrade | ||
42 | - apt-get install sudo | 39 | + # run as root! |
40 | + apt-get update -y | ||
41 | + apt-get upgrade -y | ||
42 | + apt-get install sudo -y | ||
43 | 43 | ||
44 | **Note:** | 44 | **Note:** |
45 | Vim is an editor that is used here whenever there are files that need to be | 45 | Vim is an editor that is used here whenever there are files that need to be |
@@ -55,7 +55,7 @@ Install the required packages: | @@ -55,7 +55,7 @@ Install the required packages: | ||
55 | Make sure you have the right version of Python installed. | 55 | Make sure you have the right version of Python installed. |
56 | 56 | ||
57 | # Install Python | 57 | # Install Python |
58 | - sudo apt-get install python | 58 | + sudo apt-get install -y python |
59 | 59 | ||
60 | # Make sure that Python is 2.5+ (3.x is not supported at the moment) | 60 | # Make sure that Python is 2.5+ (3.x is not supported at the moment) |
61 | python --version | 61 | python --version |
@@ -73,15 +73,17 @@ Make sure you have the right version of Python installed. | @@ -73,15 +73,17 @@ Make sure you have the right version of Python installed. | ||
73 | mail server. By default, Debian is shipped with exim4 whereas Ubuntu | 73 | mail server. By default, Debian is shipped with exim4 whereas Ubuntu |
74 | does not ship with one. The recommended mail server is postfix and you can install it with: | 74 | does not ship with one. The recommended mail server is postfix and you can install it with: |
75 | 75 | ||
76 | - sudo apt-get install postfix | 76 | + sudo apt-get install -y postfix |
77 | + | ||
78 | +Then select 'Internet Site' and press enter to confirm the hostname. | ||
77 | 79 | ||
78 | # 2. Ruby | 80 | # 2. Ruby |
79 | 81 | ||
80 | -Remove old 1.8 ruby if present | 82 | +Remove the old Ruby 1.8 if present |
81 | 83 | ||
82 | - sudo apt-get remove ruby1.8 | 84 | + sudo apt-get remove -y ruby1.8 |
83 | 85 | ||
84 | -Download and compile it: | 86 | +Download Ruby and compile it: |
85 | 87 | ||
86 | mkdir /tmp/ruby && cd /tmp/ruby | 88 | mkdir /tmp/ruby && cd /tmp/ruby |
87 | curl --progress http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz | tar xz | 89 | curl --progress http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz | tar xz |
@@ -92,7 +94,7 @@ Download and compile it: | @@ -92,7 +94,7 @@ Download and compile it: | ||
92 | 94 | ||
93 | Install the Bundler Gem: | 95 | Install the Bundler Gem: |
94 | 96 | ||
95 | - sudo gem install bundler | 97 | + sudo gem install bundler --no-ri --no-rdoc |
96 | 98 | ||
97 | 99 | ||
98 | # 3. System Users | 100 | # 3. System Users |
@@ -152,8 +154,7 @@ To setup the MySQL/PostgreSQL database and dependencies please see [`doc/install | @@ -152,8 +154,7 @@ To setup the MySQL/PostgreSQL database and dependencies please see [`doc/install | ||
152 | sudo -u git -H git checkout 5-2-stable | 154 | sudo -u git -H git checkout 5-2-stable |
153 | 155 | ||
154 | **Note:** | 156 | **Note:** |
155 | -You can change `5-2-stable` to `master` if you want the *bleeding edge* version, but | ||
156 | -do so with caution! | 157 | +You can change `5-2-stable` to `master` if you want the *bleeding edge* version, but do so with caution! |
157 | 158 | ||
158 | ## Configure it | 159 | ## Configure it |
159 | 160 | ||
@@ -205,10 +206,18 @@ Make sure to edit both `gitlab.yml` and `puma.rb` to match your setup. | @@ -205,10 +206,18 @@ Make sure to edit both `gitlab.yml` and `puma.rb` to match your setup. | ||
205 | # Mysql | 206 | # Mysql |
206 | sudo -u git cp config/database.yml.mysql config/database.yml | 207 | sudo -u git cp config/database.yml.mysql config/database.yml |
207 | 208 | ||
209 | + or | ||
210 | + | ||
208 | # PostgreSQL | 211 | # PostgreSQL |
209 | sudo -u git cp config/database.yml.postgresql config/database.yml | 212 | sudo -u git cp config/database.yml.postgresql config/database.yml |
210 | 213 | ||
211 | -Make sure to update username/password in config/database.yml. | 214 | + # Make sure to update username/password in config/database.yml. |
215 | + # You only need to adapt the production settings (first part). | ||
216 | + # If you followed the database guide than please do as follows: | ||
217 | + # Change 'root' to 'gitlab' | ||
218 | + # Change 'secure password' with the value you have given to $password | ||
219 | + # You can keep the double quotes around the password | ||
220 | + sudo -u git -H vim config/database.yml | ||
212 | 221 | ||
213 | ## Install Gems | 222 | ## Install Gems |
214 | 223 | ||
@@ -216,10 +225,10 @@ Make sure to update username/password in config/database.yml. | @@ -216,10 +225,10 @@ Make sure to update username/password in config/database.yml. | ||
216 | 225 | ||
217 | sudo gem install charlock_holmes --version '0.6.9.4' | 226 | sudo gem install charlock_holmes --version '0.6.9.4' |
218 | 227 | ||
219 | - # For MySQL (note, the option says "without") | 228 | + # For MySQL (note, the option says "without ... postgres") |
220 | sudo -u git -H bundle install --deployment --without development test postgres | 229 | sudo -u git -H bundle install --deployment --without development test postgres |
221 | 230 | ||
222 | - # Or for PostgreSQL | 231 | + # Or for PostgreSQL (note, the option says "without ... mysql") |
223 | sudo -u git -H bundle install --deployment --without development test mysql | 232 | sudo -u git -H bundle install --deployment --without development test mysql |
224 | 233 | ||
225 | 234 | ||
@@ -227,6 +236,10 @@ Make sure to update username/password in config/database.yml. | @@ -227,6 +236,10 @@ Make sure to update username/password in config/database.yml. | ||
227 | 236 | ||
228 | sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production | 237 | sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production |
229 | 238 | ||
239 | + # Type 'yes' to create the database. | ||
240 | + | ||
241 | + # When done you see 'Administrator account created:' | ||
242 | + | ||
230 | 243 | ||
231 | ## Install Init Script | 244 | ## Install Init Script |
232 | 245 | ||
@@ -269,7 +282,7 @@ If you can't or don't want to use Nginx as your web server, have a look at the | @@ -269,7 +282,7 @@ If you can't or don't want to use Nginx as your web server, have a look at the | ||
269 | [`Advanced Setup Tips`](./installation.md#advanced-setup-tips) section. | 282 | [`Advanced Setup Tips`](./installation.md#advanced-setup-tips) section. |
270 | 283 | ||
271 | ## Installation | 284 | ## Installation |
272 | - sudo apt-get install nginx | 285 | + sudo apt-get install -y nginx |
273 | 286 | ||
274 | ## Site Configuration | 287 | ## Site Configuration |
275 | 288 | ||
@@ -280,10 +293,8 @@ Download an example site config: | @@ -280,10 +293,8 @@ Download an example site config: | ||
280 | 293 | ||
281 | Make sure to edit the config file to match your setup: | 294 | Make sure to edit the config file to match your setup: |
282 | 295 | ||
283 | - # **YOUR_SERVER_FQDN** to the fully-qualified | ||
284 | - # domain name of your host serving GitLab. Also, replace | ||
285 | - # the 'listen' line with the following: | ||
286 | - # listen 80 default_server; # e.g., listen 192.168.1.1:80; | 296 | + # Change YOUR_SERVER_FQDN to the fully-qualified |
297 | + # domain name of your host serving GitLab. | ||
287 | sudo vim /etc/nginx/sites-available/gitlab | 298 | sudo vim /etc/nginx/sites-available/gitlab |
288 | 299 | ||
289 | ## Restart | 300 | ## Restart |
lib/support/nginx/gitlab
@@ -7,7 +7,7 @@ upstream gitlab { | @@ -7,7 +7,7 @@ upstream gitlab { | ||
7 | } | 7 | } |
8 | 8 | ||
9 | server { | 9 | server { |
10 | - listen YOUR_SERVER_IP:80 default_server; # e.g., listen 192.168.1.1:80; In most cases *:80 is a good idea | 10 | + listen *:80 default_server; # e.g., listen 192.168.1.1:80; In most cases *:80 is a good idea |
11 | server_name YOUR_SERVER_FQDN; # e.g., server_name source.example.com; | 11 | server_name YOUR_SERVER_FQDN; # e.g., server_name source.example.com; |
12 | server_tokens off; # don't show the version number, a security best practice | 12 | server_tokens off; # don't show the version number, a security best practice |
13 | root /home/git/gitlab/public; | 13 | root /home/git/gitlab/public; |