Commit 4110407c authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'ah-fix-postgres-intsallation-11Dec' into 'master'

Install the correct PostgreSQL version on Ubuntu 18

See merge request gitlab-org/gitlab!49817
parents 08a6363f 5c6451aa
......@@ -271,10 +271,22 @@ sudo adduser --disabled-login --gecos 'GitLab' git
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).
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
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
......@@ -426,7 +438,7 @@ Clone Enterprise Edition:
```shell
# 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
......@@ -1041,3 +1053,35 @@ On RedHat/CentOS:
```shell
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