From 6178964929047c71ec4b49e545c59ce3a4caaf81 Mon Sep 17 00:00:00 2001 From: Axilleas Pipinellis Date: Fri, 15 Feb 2013 11:52:10 +0200 Subject: [PATCH 1/5] Connect to database with git user, not gitlab --- doc/install/databases.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/install/databases.md b/doc/install/databases.md index 4c6c084d0b..61882602bb 100644 --- a/doc/install/databases.md +++ b/doc/install/databases.md @@ -27,7 +27,7 @@ GitLab supports the following databases: mysql> \q # Try connecting to the new database with the new user - sudo -u gitlab -H mysql -u gitlab -p -D gitlabhq_production + sudo -u git -H mysql -u gitlab -p -D gitlabhq_production ## PostgreSQL @@ -47,5 +47,5 @@ GitLab supports the following databases: template1=# \q # Try connecting to the new database with the new user - sudo -u gitlab -H psql -d gitlabhq_production + sudo -u git -H psql -d gitlabhq_production From 46f7b7c1f2be9ecbc2d81c886212dcd81629700e Mon Sep 17 00:00:00 2001 From: Axilleas Pipinellis Date: Fri, 15 Feb 2013 11:53:35 +0200 Subject: [PATCH 2/5] Run db:setup and db:seed_fu before gitlab:setup --- doc/install/installation.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/install/installation.md b/doc/install/installation.md index 501ae6db87..a84e8318a4 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -187,7 +187,9 @@ Make sure to update username/password in config/database.yml. ## Initialise Database and Activate Advanced Features - + + sudo -u git -H bundle exec rake db:setup RAILS_ENV=production + sudo -u git -H bundle exec rake db:seed_fu RAILS_ENV=production sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production From cdf95f1ce6992cd9252ed9113d4aa6afd2478e42 Mon Sep 17 00:00:00 2001 From: Axilleas Pipinellis Date: Fri, 15 Feb 2013 12:20:50 +0200 Subject: [PATCH 3/5] Added relative urls to other documentation files, removed duplicate debian update commands --- doc/install/installation.md | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/doc/install/installation.md b/doc/install/installation.md index a84e8318a4..6f1fcc81e2 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -1,6 +1,6 @@ This installation guide was created for Debian/Ubuntu and tested on it. -Please read `doc/install/requirements.md` for hardware and platform requirements. +Please read [`doc/install/requirements.md`](./requirements.md) for hardware and platform requirements. **Important Note:** @@ -8,12 +8,13 @@ The following steps have been known to work. If you deviate from this guide, do it with caution and make sure you don't violate any assumptions GitLab makes about its environment. For things like AWS installation scripts, init scripts or config files for -alternative web server have a look at the "Advanced Setup Tips" section. +alternative web server have a look at the [`Advanced Setup +Tips`](./installation.md#advanced-setup-tips) section. **Important Note:** If you find a bug/error in this guide please submit an issue or pull request -following the contribution guide (see `CONTRIBUTING.md`). +following the [`contribution guide`](../../CONTRIBUTING.md). - - - @@ -32,16 +33,13 @@ The GitLab installation consists of setting up the following components: # 1. Packages / Dependencies -`sudo` is not installed on Debian by default. If you don't have it you'll need -to install it first. +`sudo` is not installed on Debian by default. Make sure your system is +up-to-date and install it. # run as root - apt-get update && apt-get upgrade && apt-get install sudo - -Make sure your system is up-to-date: - - sudo apt-get update - sudo apt-get upgrade + apt-get update + apt-get upgrade + apt-get install sudo **Note:** Vim is an editor that is used here whenever there are files that need to be @@ -111,10 +109,9 @@ Create a `git` user for Gitlab: ./bin/install - # 5. Database -To setup the MySQL/PostgreSQL database and dependencies please see [`doc/install/databases.md`](./databases.md) . +To setup the MySQL/PostgreSQL database and dependencies please see [`doc/install/databases.md`](./databases.md). # 6. GitLab @@ -229,7 +226,7 @@ However there are still a few steps left. **Note:** If you can't or don't want to use Nginx as your web server, have a look at the -"Advanced Setup Tips" section. +[`Advanced Setup Tips`](./installation.md#advanced-setup-tips) section. ## Installation sudo apt-get install nginx From b65e5b1e969187b300561af6cfcdcfe39fc0c867 Mon Sep 17 00:00:00 2001 From: Axilleas Pipinellis Date: Sat, 16 Feb 2013 07:50:41 +0200 Subject: [PATCH 4/5] Nginx: edit actual file instead of symlink --- doc/install/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/install/installation.md b/doc/install/installation.md index 6f1fcc81e2..4a351d31ee 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -243,7 +243,7 @@ Make sure to edit the config file to match your setup: # Change **YOUR_SERVER_IP** and **YOUR_SERVER_FQDN** # to the IP address and fully-qualified domain name # of your host serving GitLab - sudo vim /etc/nginx/sites-enabled/gitlab + sudo vim /etc/nginx/sites-available/gitlab ## Restart From a53f687fe6876c4db8c790f933dfac9e0c3fafa4 Mon Sep 17 00:00:00 2001 From: Axilleas Pipinellis Date: Sat, 16 Feb 2013 08:24:36 +0200 Subject: [PATCH 5/5] Added creation of pids directory to fix #2995, replaced deprecated nginx init.d command with service one, some more clean-up --- doc/install/installation.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/doc/install/installation.md b/doc/install/installation.md index 4a351d31ee..50ec746803 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -94,16 +94,16 @@ Create a `git` user for Gitlab: # 4. GitLab shell - # login as git + # Login as git sudo su git - # go to home directory + # Go to home directory cd /home/git - # clone gitlab shell + # Clone gitlab shell git clone https://github.com/gitlabhq/gitlab-shell.git - # setup + # Setup cd gitlab-shell cp config.yml.example config.yml ./bin/install @@ -151,9 +151,13 @@ do so with caution! sudo chmod -R u+rwX log/ sudo chmod -R u+rwX tmp/ - # Make directory for satellites + # Create directory for satellites sudo -u git -H mkdir /home/git/gitlab-satellites + # Create directory for pids and make sure GitLab can write to it + sudo -u git -H mkdir tmp/pids/ + sudo chmod -R u+rwX tmp/pids/ + # Copy the example Unicorn config sudo -u git -H cp config/unicorn.rb.example config/unicorn.rb @@ -204,7 +208,7 @@ Make GitLab start on boot: ## Check Application Status -Check if GitLab and its environment is configured correctly: +Check if GitLab and its environment are configured correctly: sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production @@ -247,7 +251,7 @@ Make sure to edit the config file to match your setup: ## Restart - sudo /etc/init.d/nginx restart + sudo service nginx restart # Done! @@ -281,7 +285,7 @@ a different host, you can configure its connection string via the ## Custom SSH Connection -If you are running SSH on a non-standard port, you must change the gitlab user'S SSH config. +If you are running SSH on a non-standard port, you must change the gitlab user's SSH config. # Add to /home/git/.ssh/config host localhost # Give your setup a name (here: override localhost)