Guide for Manual Download and Install of Postgres12 Offline

Postgresql is one of the Tamr dependencies. It must be installed and turned on before Tamr itself is installed. This article describes how to install Postgres12 on Ubuntu 18 when the server is unable to connect to the internet to fetch packages.

  1. Download postgresql-12 debian files from a computer with internet access and then, transfer the files into the VM, then install.
  2. After downloading and installing postgresql-12 debian files, one must create a folder and put all the debian files in the folder. The debian files can be found on the Ubuntu Website.

The list of Ubuntu 18 Postgres12 required files includes:

  1. Then run the command sudo dpkg -i * in the folder

Note that, in case it runs into an error with a missing dependency or wrong version for dependency, download and add the dependency into the same folder, then rerun the above command. Repeat the process until all packages are installed without an error. It may take users a couple of rounds until all required packages are installed depending on what packages the system already has installed.

  1. Once it is set up, make sure the owner and group of the folder /var/lib/postgresql/12/main and all the files in this folder are “postgres”.

To check the owner and group of a folder, run:

ls -l /var/lib/postgresql/12/main

The third and fourth columns of the output show the owner and group.

If it is not postgres, change them to postgres (may need to run with “sudo” for permission):

For the folder, chown -R postgres:postgres /var/lib/postgresql/12/main

  1. Once the owner and group are verified “postgres”, refer to Tamr Docs on Installing PostgresSQL 12 on Ubuntu 18 and run: sudo service postgresql start
  2. Once Postgresql is running appropriately, the port 5432 should listen.

To check opening ports:

sudo lsof -i -P -n | grep LISTEN

OR: service postgresql status will return a message:

12/main (port 5432): online

  1. After the above checks, create the database based on instructions from Tamr Docs on Installing PostgresSQL 12 on Ubuntu 18.

Some other useful commands need for debugging:

Check if postgresql has started correctly without error:

sudo nano /var/log/postgresql/postgresql-12-main.log

Check the status of postgresql:

systemctl status postgresql

Restart postgresql:

systemctl restart postgresql