Air-gapped

PostgreSQL version 16.9 or higher is required.

To install PostgreSQL in an air-gapped environment, download the required packages on a preparation machine and then transfer them to the air-gapped server. The preparation machine should have internet access and run the same operating system version as the target server.

Debian, Ubuntu

Prepare packages

  1. On the preparation machine, run commands.
Bash
Copy
  1. Copy the postgresql-<version>-offline folder to a USB drive or secure transfer medium.
  2. Move it to the air-gapped server.

Install PostgreSQL

  1. On the target server, insert the USB drive or secure transfer medium.
  2. Run the commands below in the postgresql-<version>-offline folder.
Bash
Copy

Open connection

  1. Locate the PostgreSQL data directory on your server.
Bash
Copy
  1. To allow remote connections, open the postgresql.conf file and configure the following setting:
postgresql.conf
Copy
  1. To allow MetaDefender Cluster services to access the database, open the pg_hba.conf file and add the following rule.
pg_hba.conf
Copy
  1. Restart the PostgreSQL service to apply the changes.
Bash
Copy

Rocky, RHEL 9

Prepare packages

  1. On the preparation machine, run commands.
Bash
Copy
  1. Copy the postgresql-<version>-offline folder to a USB drive or secure transfer medium.
  2. Move it to the air-gapped server.

Install PostgreSQL

  1. On the target server, insert the USB drive or secure transfer medium.
  2. Run the commands below in the postgresql-<version>-offline folder.
Bash
Copy

Sometimes, other dependencies require upgrading. Example:

You should manually download the dependencies using the command dnf download --resolve --alldeps --downloaddir . <package_names> . Then copy them to the postgresql-<version>-offline folder and install again.

Open connection

  1. Locate the PostgreSQL data directory on your server.
Bash
Copy
  1. To allow remote connections, open the postgresql.conf file and configure the following setting:
postgresql.conf
Copy
  1. To allow MetaDefender Cluster services to access the database, open the pg_hba.conf file and add the following rule.
pg_hba.conf
Copy
  1. Restart the PostgreSQL service to apply the changes.
Bash
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard