diff options
Diffstat (limited to 'doc/install')
-rw-r--r-- | doc/install/database_mysql.md (renamed from doc/install/databases.md) | 32 | ||||
-rw-r--r-- | doc/install/installation.md | 87 | ||||
-rw-r--r-- | doc/install/requirements.md | 26 | ||||
-rw-r--r-- | doc/install/structure.md | 20 |
4 files changed, 72 insertions, 93 deletions
diff --git a/doc/install/databases.md b/doc/install/database_mysql.md index 1d9405dfa96..4cf9b94c1a0 100644 --- a/doc/install/databases.md +++ b/doc/install/database_mysql.md @@ -1,10 +1,6 @@ -# Setup Database - -GitLab supports the following databases: - -* MySQL (preferred) -* PostgreSQL +## Note +We do not recommend using MySQL due to various issues. For example, case [(in)sensitivity](https://dev.mysql.com/doc/refman/5.0/en/case-sensitivity.html) and [problems](http://bugs.mysql.com/bug.php?id=65830) that [suggested](http://bugs.mysql.com/bug.php?id=50909) [fixes](http://bugs.mysql.com/bug.php?id=65830) [have](http://bugs.mysql.com/bug.php?id=63164). ## MySQL @@ -16,7 +12,7 @@ GitLab supports the following databases: # Secure your installation. sudo mysql_secure_installation - + # Login to MySQL mysql -u root -p @@ -47,25 +43,3 @@ GitLab supports the following databases: mysql> \q # You are done installing the database and can go back to the rest of the installation. - - -## PostgreSQL - - # Install the database packages - sudo apt-get install -y postgresql-9.1 postgresql-client libpq-dev - - # Login to PostgreSQL - sudo -u postgres psql -d template1 - - # Create a user for GitLab. (change $password to a real password) - template1=# CREATE USER git; - - # Create the GitLab production database & grant all privileges on database - template1=# CREATE DATABASE gitlabhq_production OWNER git; - - # Quit the database session - template1=# \q - - # Try connecting to the new database with the new user - sudo -u git -H psql -d gitlabhq_production - diff --git a/doc/install/installation.md b/doc/install/installation.md index 6961e461482..d6e0a8a0012 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -2,15 +2,17 @@ Make sure you view this installation guide from the branch (version) of GitLab you would like to install. In most cases this should be the highest numbered stable branch (example shown below). - + If this is unclear check the [GitLab Blog](http://blog.gitlab.org/) for installation guide links by version. # Important notes -This installation guide was created for and tested on **Debian/Ubuntu** operating systems. Please read [`doc/install/requirements.md`](./requirements.md) for hardware and operating system requirements. +This guide is long because it covers many cases and includes all commands you need, this is [one of the few installation scripts that actually works out of the box](https://twitter.com/robinvdvleuten/status/424163226532986880). -This is the official installation guide to set up a production server. To set up a **development installation** or for many other installation options please consult [the installation section in the readme](https://github.com/gitlabhq/gitlabhq#installation). +This installation guide was created for and tested on **Debian/Ubuntu** operating systems. Please read [doc/install/requirements.md](./requirements.md) for hardware and operating system requirements. An unofficial guide for RHEL/CentOS can be found in the [GitLab recipes repository](https://gitlab.com/gitlab-org/gitlab-recipes/tree/master/install/centos). + +This is the official installation guide to set up a production server. To set up a **development installation** or for many other installation options please see [the installation section of the readme](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/README.md#installation). The following steps have been known to work. Please **use caution when you deviate** from this guide. Make sure you don't violate any assumptions GitLab makes about its environment. For example many people run into permission problems because they changed the location of directories or run services as the wrong user. @@ -54,26 +56,6 @@ Install the required packages: sudo apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl openssh-server redis-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev logrotate -Make sure you have the right version of Python installed. - - # 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 - - # If it's Python 3 you might need to install Python 2 separately - sudo apt-get install -y python2.7 - - # Make sure you can access Python via python2 - python2 --version - - # If you get a "command not found" error create a link to the python binary - sudo ln -s /usr/bin/python /usr/bin/python2 - - # For reStructuredText markup language support install required package: - sudo apt-get install -y python-docutils - Make sure you have the right version of Git installed # Install Git @@ -92,8 +74,8 @@ Is the system packaged Git too old? Remove it and compile from source. # Download and compile from source cd /tmp - curl --progress https://git-core.googlecode.com/files/git-1.8.4.1.tar.gz | tar xz - cd git-1.8.4.1/ + curl --progress https://git-core.googlecode.com/files/git-1.8.5.2.tar.gz | tar xz + cd git-1.8.5.2/ make prefix=/usr/local all # Install into /usr/local/bin @@ -111,6 +93,8 @@ Then select 'Internet Site' and press enter to confirm the hostname. # 2. Ruby +The use of ruby version managers such as [RVM](http://rvm.io/), [rbenv](https://github.com/sstephenson/rbenv) or [chruby](https://github.com/postmodern/chruby) with GitLab in production frequently leads to hard to diagnose problems. Version managers are not supported and we stronly advise everyone to follow the instructions below to use a system ruby. + Remove the old Ruby 1.8 if present sudo apt-get remove ruby1.8 @@ -160,7 +144,25 @@ GitLab Shell is an ssh access and repository management software developed speci # 5. Database -To setup the MySQL/PostgreSQL database and dependencies please see [`doc/install/databases.md`](./databases.md). +We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](doc/install/database_mysql.md). + + # Install the database packages + sudo apt-get install -y postgresql-9.1 postgresql-client libpq-dev + + # Login to PostgreSQL + sudo -u postgres psql -d template1 + + # Create a user for GitLab. + template1=# CREATE USER git; + + # Create the GitLab production database & grant all privileges on database + template1=# CREATE DATABASE gitlabhq_production OWNER git; + + # Quit the database session + template1=# \q + + # Try connecting to the new database with the new user + sudo -u git -H psql -d gitlabhq_production # 6. GitLab @@ -171,13 +173,13 @@ To setup the MySQL/PostgreSQL database and dependencies please see [`doc/install ## Clone the Source # Clone GitLab repository - sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 6-4-stable gitlab + sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 6-6-stable gitlab # Go to gitlab dir cd /home/git/gitlab **Note:** -You can change `6-4-stable` to `master` if you want the *bleeding edge* version, but never install master on a production server! +You can change `6-6-stable` to `master` if you want the *bleeding edge* version, but never install master on a production server! ## Configure it @@ -232,8 +234,8 @@ Make sure to edit both `gitlab.yml` and `unicorn.rb` to match your setup. ## Configure GitLab DB settings - # Mysql - sudo -u git cp config/database.yml.mysql config/database.yml + # PostgreSQL + sudo -u git cp config/database.yml.postgresql config/database.yml # Make sure to update username/password in config/database.yml. # You only need to adapt the production settings (first part). @@ -243,10 +245,8 @@ Make sure to edit both `gitlab.yml` and `unicorn.rb` to match your setup. sudo -u git -H editor config/database.yml or - - # PostgreSQL - sudo -u git cp config/database.yml.postgresql config/database.yml - + # Mysql + sudo -u git cp config/database.yml.mysql config/database.yml # Make config/database.yml readable to git only sudo -u git -H chmod o-rwx config/database.yml @@ -255,18 +255,18 @@ Make sure to edit both `gitlab.yml` and `unicorn.rb` to match your setup. cd /home/git/gitlab - # For MySQL (note, the option says "without ... postgres") - sudo -u git -H bundle install --deployment --without development test postgres aws - - # Or for PostgreSQL (note, the option says "without ... mysql") + # For PostgreSQL (note, the option says "without ... mysql") sudo -u git -H bundle install --deployment --without development test mysql aws + # Or if you use MySQL (note, the option says "without ... postgres") + sudo -u git -H bundle install --deployment --without development test postgres aws + ## Initialize Database and Activate Advanced Features sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production - # Type 'yes' to create the database. + # Type 'yes' to create the database tables. # When done you see 'Administrator account created:' @@ -366,6 +366,15 @@ nobody can access your GitLab by using this login information later on. # Advanced Setup Tips +## Additional markup styles + +Apart from the always supported markdown style there are other rich text files that GitLab can display. +But you might have to install a depency to do so. +Please see the [github-markup gem readme](https://github.com/gitlabhq/markup#markups) for more information. +For example, reStructuredText markup language support requires python-docutils: + + sudo apt-get install -y python-docutils + ## Custom Redis Connection If you'd like Resque to connect to a Redis server on a non-standard port or on diff --git a/doc/install/requirements.md b/doc/install/requirements.md index e9c95ba2ef9..ea172733b11 100644 --- a/doc/install/requirements.md +++ b/doc/install/requirements.md @@ -1,6 +1,6 @@ # Operating Systems -GitLab is developed for the Linux operating system. +GitLab is developed for the Linux operating system. For the installations options and instructions please see [the installation section of the readme](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/README.md#installation). ## GitLab officially supports @@ -13,13 +13,13 @@ GitLab is developed for the Linux operating system. - CentOS - Oracle Linux -## Not officially supported +## Not officially supported are - Arch Linux - Fedora - Gentoo -On the above distributions it is pretty easy to install GitLab yourself. +But on the above distributions it is pretty easy to install GitLab yourself. ## Unsupported Unix Systems @@ -37,9 +37,8 @@ Please consider using a virtual machine to run GitLab. # Ruby versions GitLab requires Ruby (MRI) 1.9.3 or 2.0+. -While it is generally possible to use other Rubies -(like [JRuby](http://jruby.org/) or [Rubinius](http://rubini.us/)) -it might require some work since GitLab uses several Gems that have native extensions. +You will have to use the standard MRI implementation of Ruby. +We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/)) but GitLab needs several Gems that have native extensions. # Hardware requirements @@ -48,14 +47,14 @@ it might require some work since GitLab uses several Gems that have native exten - 1 core works for under 100 users but the responsiveness might suffer - **2 cores** is the **recommended** number of cores and supports up to 100 users -- 4 cores supports about 1,000 users +- 4 cores supports up to 1,000 users - 8 cores supports up to 10,000 users ## Memory - 512MB is too little memory, GitLab will be very slow and you will need 250MB of swap - 768MB is the minimal memory size but we advise against this -- 1GB supports up to 100 users if you do not have individual repo's over 250MB +- 1GB supports up to 100 users (with individual repositories under 250MB, otherwise git memory usage necessitates using swap space) - **2GB** is the **recommended** memory size and supports up to 1,000 users - 4GB supports up to 10,000 users @@ -71,8 +70,11 @@ Apart from a local hard drive you can also mount a volume that supports the netw If you have enough RAM memory and a recent CPU the speed of GitLab is mainly limited by hard drive seek times. Having a fast drive (7200 RPM and up) or a solid state drive (SSD) will improve the responsiveness of GitLab. -# Installation troubles and reporting success or failure -If you have troubles installing GitLab following the [official installation guide](installation.md) -or want to share your experience installing GitLab on a not officially supported -platform, please follow the the [contribution guide](/CONTRIBUTING.md). +# Supported webbrowsers + +- Chrome (Latest stable version) +- Firefox (Latest released version) +- Safari 7+ (Know problem: required fields in html5 do not work) +- Opera (Latest released version) +- IE 10+ diff --git a/doc/install/structure.md b/doc/install/structure.md index f580ea159a2..67ca1895374 100644 --- a/doc/install/structure.md +++ b/doc/install/structure.md @@ -10,18 +10,12 @@ This is the directory structure you will end up with following the instructions | |-- gitlab-shell | |-- repositories +* `/home/git/.ssh` - contains openssh settings. Specifically the `authorized_keys` file managed by gitlab-shell. +* `/home/git/gitlab` - GitLab core software. +* `/home/git/gitlab-satellites` - checked out repositories for merge requests and file editing from web UI. This can be treated as a temporary files directory. +* `/home/git/gitlab-shell` - Core add-on component of gitlab. Maintains SSH cloning and other functionality. +* `/home/git/repositories` - bare repositories for all projects organized by namespace. This is where the git repositories which are pushed/pulled are maintained for all projects. **This area is critical data for projects. [Keep a backup](../raketasks/backup_restore.md)** -**/home/git/.ssh** +*Note: the default locations for gitlab-satellites and repositories can be configured in `config/gitlab.yml` of gitlab and `config.yml` of gitlab-shell.* -**/home/git/gitlab** - This is where GitLab lives. - -**/home/git/gitlab-satellites** - Contains a copy of all repositories with a working tree. - It's used for merge requests, editing files, etc. - -**/home/git/repositories** - Holds all your repositories in bare format. - This is the place Git uses when you pull/push to your projects. - -You can change them in your `config/gitlab.yml` file. +To see a more in-depth overview see the [GitLab architecture doc](../development/architecture.md). |