Commit 5c6451aa authored by Asmaa Hassan's avatar Asmaa Hassan Committed by Achilleas Pipinellis

Install the correct PostgreSQL version on Ubuntu 18

parent 08a6363f
...@@ -271,10 +271,22 @@ sudo adduser --disabled-login --gecos 'GitLab' git ...@@ -271,10 +271,22 @@ sudo adduser --disabled-login --gecos 'GitLab' git
NOTE: NOTE:
In GitLab 12.1 and later, only PostgreSQL is supported. In GitLab 13.0 and later, we [require PostgreSQL 11+](requirements.md#postgresql-requirements). In GitLab 12.1 and later, only PostgreSQL is supported. In GitLab 13.0 and later, we [require PostgreSQL 11+](requirements.md#postgresql-requirements).
1. Install the database packages: 1. Install the database packages.
For Ubuntu 20.04 and later:
```shell
sudo apt install -y postgresql postgresql-client libpq-dev postgresql-contrib
```
For Ubuntu 18.04 and earlier, the available PostgreSQL doesn't meet the minimum
version requirement. You need to add PostgreSQL's repository:
```shell ```shell
sudo apt-get install -y postgresql postgresql-client libpq-dev postgresql-contrib wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
RELEASE=$(lsb_release -cs) echo "deb http://apt.postgresql.org/pub/repos/apt/ ${RELEASE}"-pgdg main | sudo tee /etc/apt/sources.list.d/pgdg.list
sudo apt update
sudo apt -y install postgresql-11 postgresql-client-11 libpq-dev
``` ```
1. Verify the PostgreSQL version you have is supported by the version of GitLab you're 1. Verify the PostgreSQL version you have is supported by the version of GitLab you're
...@@ -426,7 +438,7 @@ Clone Enterprise Edition: ...@@ -426,7 +438,7 @@ Clone Enterprise Edition:
```shell ```shell
# Clone GitLab repository # Clone GitLab repository
sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab.git -b <X-Y-stable> gitlab sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab.git -b <X-Y-stable-ee> gitlab
``` ```
Make sure to replace `<X-Y-stable>` with the stable branch that matches the Make sure to replace `<X-Y-stable>` with the stable branch that matches the
...@@ -1041,3 +1053,35 @@ On RedHat/CentOS: ...@@ -1041,3 +1053,35 @@ On RedHat/CentOS:
```shell ```shell
sudo yum groupinstall 'Development Tools' sudo yum groupinstall 'Development Tools'
``` ```
### Error compiling GitLab assets
While compiling assets, you might get the following error:
```plaintext
Killed
error Command failed with exit code 137.
```
This happens because when a container runs out of memory, YARN automatically kills it.
To fix this, first make sure you increase your machine's memory (8GB of memory should be good),
and then run the following commands:
1. Clean the assets:
```shell
sudo -u git -H bundle exec rake gitlab:assets:clean RAILS_ENV=production NODE_ENV=production
```
1. Run the `yarn` command again to ensure any conflicts are resolved:
```shell
sudo -u git -H yarn install --production --pure-lockfile
```
1. Recompile assets:
```shell
sudo -u git -H bundle exec rake gitlab:assets:compile RAILS_ENV=production NODE_ENV=production
```
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment