Make the installation guide easier to follow for non-unix people.
This commit is contained in:
parent
70e80d95a7
commit
f01d482427
3 changed files with 53 additions and 22 deletions
|
@ -8,13 +8,23 @@ GitLab supports the following databases:
|
|||
|
||||
## MySQL
|
||||
|
||||
# If you are the git user log out since it doesn't have sudo rights
|
||||
exit
|
||||
|
||||
# Install the database packages
|
||||
sudo apt-get install -y mysql-server mysql-client libmysqlclient-dev
|
||||
|
||||
# Pick a database root password (can be anything), type it and press enter
|
||||
# Retype the database root password and press enter
|
||||
|
||||
# Login to MySQL
|
||||
mysql -u root -p
|
||||
|
||||
# Create a user for GitLab. (change $password to a real password)
|
||||
# Type the database root password
|
||||
|
||||
# Create a user for GitLab
|
||||
# do not type the 'mysql>', this is part of the prompt
|
||||
# change $password in the command below to a real password you pick
|
||||
mysql> CREATE USER 'gitlab'@'localhost' IDENTIFIED BY '$password';
|
||||
|
||||
# Create the GitLab production database
|
||||
|
@ -29,6 +39,16 @@ GitLab supports the following databases:
|
|||
# Try connecting to the new database with the new user
|
||||
sudo -u git -H mysql -u gitlab -p -D gitlabhq_production
|
||||
|
||||
# Type the password you replaced $password with earlier
|
||||
|
||||
# You should now see a 'mysql>' prompt
|
||||
|
||||
# Quit the database session
|
||||
mysql> \q
|
||||
|
||||
# You are done installing the database and can go back to the rest of the installation.
|
||||
|
||||
|
||||
## PostgreSQL
|
||||
|
||||
# Install the database packages
|
||||
|
|
|
@ -36,10 +36,10 @@ The GitLab installation consists of setting up the following components:
|
|||
`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
|
||||
# run as root!
|
||||
apt-get update -y
|
||||
apt-get upgrade -y
|
||||
apt-get install sudo -y
|
||||
|
||||
**Note:**
|
||||
Vim is an editor that is used here whenever there are files that need to be
|
||||
|
@ -55,7 +55,7 @@ Install the required packages:
|
|||
Make sure you have the right version of Python installed.
|
||||
|
||||
# Install Python
|
||||
sudo apt-get install python
|
||||
sudo apt-get install -y python
|
||||
|
||||
# Make sure that Python is 2.5+ (3.x is not supported at the moment)
|
||||
python --version
|
||||
|
@ -73,15 +73,17 @@ Make sure you have the right version of Python installed.
|
|||
mail server. By default, Debian is shipped with exim4 whereas Ubuntu
|
||||
does not ship with one. The recommended mail server is postfix and you can install it with:
|
||||
|
||||
sudo apt-get install postfix
|
||||
sudo apt-get install -y postfix
|
||||
|
||||
Then select 'Internet Site' and press enter to confirm the hostname.
|
||||
|
||||
# 2. Ruby
|
||||
|
||||
Remove old 1.8 ruby if present
|
||||
Remove the old Ruby 1.8 if present
|
||||
|
||||
sudo apt-get remove ruby1.8
|
||||
sudo apt-get remove -y ruby1.8
|
||||
|
||||
Download and compile it:
|
||||
Download Ruby and compile it:
|
||||
|
||||
mkdir /tmp/ruby && cd /tmp/ruby
|
||||
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:
|
|||
|
||||
Install the Bundler Gem:
|
||||
|
||||
sudo gem install bundler
|
||||
sudo gem install bundler --no-ri --no-rdoc
|
||||
|
||||
|
||||
# 3. System Users
|
||||
|
@ -152,8 +154,7 @@ To setup the MySQL/PostgreSQL database and dependencies please see [`doc/install
|
|||
sudo -u git -H git checkout 5-2-stable
|
||||
|
||||
**Note:**
|
||||
You can change `5-2-stable` to `master` if you want the *bleeding edge* version, but
|
||||
do so with caution!
|
||||
You can change `5-2-stable` to `master` if you want the *bleeding edge* version, but do so with caution!
|
||||
|
||||
## Configure it
|
||||
|
||||
|
@ -205,10 +206,18 @@ Make sure to edit both `gitlab.yml` and `puma.rb` to match your setup.
|
|||
# Mysql
|
||||
sudo -u git cp config/database.yml.mysql config/database.yml
|
||||
|
||||
or
|
||||
|
||||
# PostgreSQL
|
||||
sudo -u git cp config/database.yml.postgresql config/database.yml
|
||||
|
||||
Make sure to update username/password in config/database.yml.
|
||||
# Make sure to update username/password in config/database.yml.
|
||||
# You only need to adapt the production settings (first part).
|
||||
# If you followed the database guide than please do as follows:
|
||||
# Change 'root' to 'gitlab'
|
||||
# Change 'secure password' with the value you have given to $password
|
||||
# You can keep the double quotes around the password
|
||||
sudo -u git -H vim config/database.yml
|
||||
|
||||
## Install Gems
|
||||
|
||||
|
@ -216,10 +225,10 @@ Make sure to update username/password in config/database.yml.
|
|||
|
||||
sudo gem install charlock_holmes --version '0.6.9.4'
|
||||
|
||||
# For MySQL (note, the option says "without")
|
||||
# For MySQL (note, the option says "without ... postgres")
|
||||
sudo -u git -H bundle install --deployment --without development test postgres
|
||||
|
||||
# Or for PostgreSQL
|
||||
# Or for PostgreSQL (note, the option says "without ... mysql")
|
||||
sudo -u git -H bundle install --deployment --without development test mysql
|
||||
|
||||
|
||||
|
@ -227,6 +236,10 @@ Make sure to update username/password in config/database.yml.
|
|||
|
||||
sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production
|
||||
|
||||
# Type 'yes' to create the database.
|
||||
|
||||
# When done you see 'Administrator account created:'
|
||||
|
||||
|
||||
## Install Init Script
|
||||
|
||||
|
@ -269,7 +282,7 @@ If you can't or don't want to use Nginx as your web server, have a look at the
|
|||
[`Advanced Setup Tips`](./installation.md#advanced-setup-tips) section.
|
||||
|
||||
## Installation
|
||||
sudo apt-get install nginx
|
||||
sudo apt-get install -y nginx
|
||||
|
||||
## Site Configuration
|
||||
|
||||
|
@ -280,10 +293,8 @@ Download an example site config:
|
|||
|
||||
Make sure to edit the config file to match your setup:
|
||||
|
||||
# **YOUR_SERVER_FQDN** to the fully-qualified
|
||||
# domain name of your host serving GitLab. Also, replace
|
||||
# the 'listen' line with the following:
|
||||
# listen 80 default_server; # e.g., listen 192.168.1.1:80;
|
||||
# Change YOUR_SERVER_FQDN to the fully-qualified
|
||||
# domain name of your host serving GitLab.
|
||||
sudo vim /etc/nginx/sites-available/gitlab
|
||||
|
||||
## Restart
|
||||
|
|
|
@ -7,7 +7,7 @@ upstream gitlab {
|
|||
}
|
||||
|
||||
server {
|
||||
listen YOUR_SERVER_IP:80 default_server; # e.g., listen 192.168.1.1:80; In most cases *:80 is a good idea
|
||||
listen *:80 default_server; # e.g., listen 192.168.1.1:80; In most cases *:80 is a good idea
|
||||
server_name YOUR_SERVER_FQDN; # e.g., server_name source.example.com;
|
||||
server_tokens off; # don't show the version number, a security best practice
|
||||
root /home/git/gitlab/public;
|
||||
|
|
Loading…
Reference in a new issue