Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/install/installation.md')
-rw-r--r--doc/install/installation.md96
1 files changed, 55 insertions, 41 deletions
diff --git a/doc/install/installation.md b/doc/install/installation.md
index eda9c503e28..28aa37f0d1b 100644
--- a/doc/install/installation.md
+++ b/doc/install/installation.md
@@ -11,8 +11,7 @@ using the source files. To set up a **development installation** or for many
other installation options, see the [main installation page](index.md).
It was created for and tested on **Debian/Ubuntu** operating systems.
Read [requirements.md](requirements.md) for hardware and operating system requirements.
-If you want to install on RHEL/CentOS, we recommend using the
-[Omnibus packages](https://about.gitlab.com/install/).
+If you want to install on RHEL/CentOS, you should use the [Omnibus packages](https://about.gitlab.com/install/).
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 work out of the box](https://twitter.com/robinvdvleuten/status/424163226532986880).
@@ -46,17 +45,17 @@ If the highest number stable branch is unclear, check the [GitLab blog](https://
## Software requirements
-| Software | Minimum version | Notes |
-| ------------------ | --------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| [Ruby](#2-ruby) | `2.7` | From GitLab 13.6, Ruby 2.7 is required. Ruby 3.0 is not supported yet (see [the relevant epic](https://gitlab.com/groups/gitlab-org/-/epics/5149) for the current status). You must use the standard MRI implementation of Ruby. We love [JRuby](https://www.jruby.org/) and [Rubinius](https://github.com/rubinius/rubinius#the-rubinius-language-platform), but GitLab needs several Gems that have native extensions. |
-| [Go](#3-go) | `1.18` | From GitLab 15.6, Go 1.18 or later is required. |
-| [Git](#git) | `2.38.x` | From GitLab 15.8, Git 2.38.x and later is required. It's highly recommended that you use the [Git version provided by Gitaly](#git). |
-| [Node.js](#4-node) | `16.15.0` | From GitLab 15.7, Node.js 16.15.0 or later is required. |
+| Software | Minimum version | Notes |
+|:------------------------|:----------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| [Ruby](#2-ruby) | `3.0.x` | From GitLab 15.10, Ruby 3.0 is required. You must use the standard MRI implementation of Ruby. We love [JRuby](https://www.jruby.org/) and [Rubinius](https://github.com/rubinius/rubinius#the-rubinius-language-platform), but GitLab needs several Gems that have native extensions. |
+| [RubyGems](#3-rubygems) | `3.4.x` | A specific RubyGems version is not fully needed, but it's recommended to update so you can enjoy some known performance improvements. |
+| [Go](#4-go) | `1.18.x` | From GitLab 15.6, Go 1.18 or later is required. |
+| [Git](#git) | `2.38.x` | From GitLab 15.8, Git 2.38.x and later is required. It's highly recommended that you use the [Git version provided by Gitaly](#git). |
+| [Node.js](#5-node) | `16.15.0` | From GitLab 15.7, Node.js 16.15.0 or later is required. |
## GitLab directory structure
-This is the main directory structure you end up with following the instructions
-of this page:
+When following the instructions on this page, you create this directory structure:
```plaintext
|-- home
@@ -88,13 +87,14 @@ The GitLab installation consists of setting up the following components:
1. [Packages and dependencies](#1-packages-and-dependencies).
1. [Ruby](#2-ruby).
-1. [Go](#3-go).
-1. [Node](#4-node).
-1. [System users](#5-system-users).
-1. [Database](#6-database).
-1. [Redis](#7-redis).
-1. [GitLab](#8-gitlab).
-1. [NGINX](#9-nginx).
+1. [RubyGems](#3-rubygems).
+1. [Go](#4-go).
+1. [Node](#5-node).
+1. [System users](#6-system-users).
+1. [Database](#7-database).
+1. [Redis](#8-redis).
+1. [GitLab](#9-gitlab).
+1. [NGINX](#10-nginx).
## 1. Packages and dependencies
@@ -220,20 +220,25 @@ below to use a system Ruby.
Linux distributions generally have older versions of Ruby available, so these
instructions are designed to install Ruby from the official source code.
-Download Ruby and compile it:
+[Install Ruby](https://www.ruby-lang.org/en/documentation/installation/).
+
+## 3. RubyGems
+
+Sometimes, a newer version of RubyGems is required than the one bundled with Ruby.
+
+To update to a specific version:
+
+```shell
+gem update --system 3.4.12
+```
+
+Or the latest version:
```shell
-mkdir /tmp/ruby && cd /tmp/ruby
-curl --remote-name --location --progress-bar "https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.6.tar.gz"
-echo 'e7203b0cc09442ed2c08936d483f8ac140ec1c72e37bb5c401646b7866cb5d10 ruby-2.7.6.tar.gz' | sha256sum -c - && tar xzf ruby-2.7.6.tar.gz
-cd ruby-2.7.6
-
-./configure --disable-install-rdoc --enable-shared
-make
-sudo make install
+gem update --system
```
-## 3. Go
+## 4. Go
GitLab has several daemons written in Go. To install
GitLab we need a Go compiler. The instructions below assume you use 64-bit
@@ -251,7 +256,7 @@ sudo ln -sf /usr/local/go/bin/{go,gofmt} /usr/local/bin/
rm go1.18.8.linux-amd64.tar.gz
```
-## 4. Node
+## 5. Node
GitLab requires the use of Node to compile JavaScript
assets, and Yarn to manage JavaScript dependencies. The current minimum
@@ -275,7 +280,7 @@ npm install --global yarn
Visit the official websites for [node](https://nodejs.org/en/download/package-manager/) and [yarn](https://classic.yarnpkg.com/en/docs/install/) if you have any trouble with these steps.
-## 5. System users
+## 6. System users
Create a `git` user for GitLab:
@@ -283,10 +288,10 @@ Create a `git` user for GitLab:
sudo adduser --disabled-login --gecos 'GitLab' git
```
-## 6. Database
+## 7. Database
NOTE:
-In GitLab 12.1 and later, only PostgreSQL is supported. In GitLab 14.0 and later, we [require PostgreSQL 12+](requirements.md#postgresql-requirements).
+In GitLab 12.1 and later, only PostgreSQL is supported. In GitLab 16.0 and later, we [require PostgreSQL 13+](requirements.md#postgresql-requirements).
1. Install the database packages.
@@ -416,7 +421,7 @@ In GitLab 12.1 and later, only PostgreSQL is supported. In GitLab 14.0 and later
gitlabhq_production> \q
```
-## 7. Redis
+## 8. Redis
See the [requirements page](requirements.md#redis-versions) for the minimum
Redis requirements.
@@ -499,7 +504,7 @@ fi
sudo service redis-server restart
```
-## 8. GitLab
+## 9. GitLab
```shell
# We'll install GitLab into the home directory of the user "git"
@@ -593,6 +598,10 @@ If you want to use HTTPS, see [Using HTTPS](#using-https) for the additional ste
### Configure GitLab DB Settings
+NOTE:
+From [GitLab 15.9](https://gitlab.com/gitlab-org/gitlab/-/issues/387898), `database.yml` with only a section: `main:` is deprecated.
+In GitLab 17.0 and later, you must have the two `main:` and `ci:` sections in your `database.yml`.
+
```shell
sudo -u git cp config/database.yml.postgresql config/database.yml
@@ -604,6 +613,11 @@ sudo -u git cp config/database.yml.postgresql config/database.yml
# adapter: postgresql
# encoding: unicode
# database: gitlabhq_production
+# ci:
+# adapter: postgresql
+# encoding: unicode
+# database: gitlabhq_production
+# database_tasks: false
#
sudo -u git -H editor config/database.yml
@@ -622,10 +636,10 @@ sudo -u git -H editor config/database.yml
sudo -u git -H chmod o-rwx config/database.yml
```
-NOTE:
-From GitLab 15.9, `database.yml` with only a section: `main:` is deprecated.
-In GitLab 15.10 and later, you should have two sections in your `database.yml`, `main:` and `ci:`. The `ci`: connection [must be to the same database](../administration/postgresql/multiple_databases.md).
-In GitLab 17.0 and later, you must have the two `main:` and `ci:` sections in your `database.yml`.
+You should have two sections in your `database.yml`: `main:` and `ci:`. The `ci`:
+connection [must be to the same database](../administration/postgresql/multiple_databases.md).
+If, for any reason, you wish to remain on a single database connection, remove the `ci:`
+section from `config/database.yml`.
### Install Gems
@@ -872,10 +886,10 @@ sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production force=yes
# When done, you see 'Administrator account created:'
```
-You can set the Administrator/root password and email by supplying them in environmental variables, `GITLAB_ROOT_PASSWORD` and `GITLAB_ROOT_EMAIL` respectively, as seen below. If you don't set the password (and it is set to the default one), wait to expose GitLab to the public internet until the installation is done and you've logged into the server the first time. During the first login, you are forced to change the default password. An Enterprise Edition license may also be installed at this time by supplying a full path in the `GITLAB_LICENSE_FILE` environment variable.
+You can set the Administrator/root password and email by supplying them in environmental variables, `GITLAB_ROOT_PASSWORD` and `GITLAB_ROOT_EMAIL`, as seen below. If you don't set the password (and it is set to the default one), wait to expose GitLab to the public internet until the installation is done and you've logged into the server the first time. During the first login, you are forced to change the default password. An Enterprise Edition subscription may also be activated at this time by supplying the activation code in the `GITLAB_ACTIVATION_CODE` environment variable.
```shell
-sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production GITLAB_ROOT_PASSWORD=yourpassword GITLAB_ROOT_EMAIL=youremail GITLAB_LICENSE_FILE="/path/to/license"
+sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production GITLAB_ROOT_PASSWORD=yourpassword GITLAB_ROOT_EMAIL=youremail GITLAB_ACTIVATION_CODE=yourcode
```
### Secure `secrets.yml`
@@ -915,7 +929,7 @@ sudo systemctl start gitlab.target
sudo service gitlab start
```
-## 9. NGINX
+## 10. NGINX
NGINX is the officially supported web server for GitLab. If you cannot or do not want to use NGINX as your web server, see [GitLab recipes](https://gitlab.com/gitlab-org/gitlab-recipes/).
@@ -1160,7 +1174,7 @@ prometheus:
If you see this message when attempting to clone a repository hosted by GitLab,
this is likely due to an outdated NGINX or Apache configuration, or a missing or
misconfigured GitLab Workhorse instance. Double-check that you've
-[installed Go](#3-go), [installed GitLab Workhorse](#install-gitlab-workhorse),
+[installed Go](#4-go), [installed GitLab Workhorse](#install-gitlab-workhorse),
and correctly [configured NGINX](#site-configuration).
### `google-protobuf` "LoadError: /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.14' not found"