GitLab installation on Omnibus - jrcloudsolutions/tidbits GitHub Wiki
https://docs.gitlab.com/ee/install/installation.html#7-database docs.gitlab.com/omnibus/installation/index.html
Add the postgreSQL repo sudo dnf install .....
-
Install the DB back end 1.1 Disable the built-in PostgreSQL module: Since RHEL uses a built-in PostgreSQL module, you'll need to disable it to prevent conflicts with the version that you are installing from the PostgreSQL repo: ** sudo dnf -qy module disable postgresql **
-
Install PostgreSQL 16: ** sudo dnf install -y postgresql16-server **
-
Initialize the PostgreSQL database: ** sudo /usr/pgsql-16/bin/postgresql-16-setup initdb **
-
Enable and start PostgreSQL: ** sudo systemctl enable postgresql-16 ** ** sudo systemctl start postgresql-16 **
-
Verify PostgreSQL: ** sudo -u postgres psql **
-
psql --version
-
sudo -i su postgres (change to actual 1. Install the DB back end 1.1 Disable the built-in PostgreSQL module: Since RHEL uses a built-in PostgreSQL module, you'll need to disable it to prevent conflicts with the version that you are installing from the PostgreSQL repo: ** sudo dnf -qy module disable postgresql **
-
Install PostgreSQL 16: ** sudo dnf install -y postgresql16-server **
-
Initialize the PostgreSQL database: ** sudo /usr/pgsql-16/bin/postgresql-16-setup initdb **
-
Enable and start PostgreSQL: ** sudo systemctl enable postgresql-16 ** ** sudo systemctl start postgresql-16 **
-
Verify PostgreSQL: ** sudo -u postgres psql ** psql (shows the version of the postgresql.conf config file)
-
We want the DB to be in /data volume
/var/lib/pgsql/16/data/ <=====
nano /var/lib/psql... Then, update /data/repo
Then, sudo systemctl stop postgressql-16, then start
Change ownership sudo -R postgres:postgres /repo
rsync -av /var/lib/pgsql/16/data/ /data/repo (to sync the source directory to the target one. -av = verbose. This is a one-time command)
Once the DB is configured, then create a database user for GitLab:
sudo adduser --system git (need to add the git linux user first) sudo -u postgres psql -d template1 -c "CREATE USER git CREATEDB;"
sudo -u postgres psql -d template1 -c "CREATE EXTENSION IF NOT EXISTS pg_trgm;"