Linux Server setup

Install and connect PostgreSQL pgAdmin

A free administration software for the relational database PostgreSQL is pgAdmin.

Set password for the database user

It is required that the database user tom authenticates to the PostgreSQL service with a password. If no password has been set yet, we can do it on the shell. To do this, we first open the PostgreSQL console:

__$ psql -d postgres

We set the password with \password tom:

__# \password tom

Connect pgAdmin

On our server we have disabled remote access to the PostgreSQL database, so we connect pgAdmin via SSH.

After installation, we must first set a master password:

pgAdmin master password
PostgreSQL pgAdmin

In the overview, we select "Add New Server" and create a new connection (the SSH credentials are based on the previous work of setting up a Linux web server and setting up Databases):

create new connection
name connection
PostgreSQL connection data
SSH tunnel data
save connection

The connection parameters are:

  • General
    • Name: "freely selectable" (for example server IP)
  • Connection
    • Hostname/address: localhost
    • Port: 5432 (PostgreSQL default port)
    • Maintenance database: postgres
    • Username: tom (database user)
    • Password: *****
  • SSH Tunnel
    • Use SSH tunneling: on
    • Tunnel host: (server IP)
    • Tunnel port: 22123 (server port)
    • Username: tom
    • Authentication: Identity file
    • Identity file: "Path to private key"
    • Passwort: *****

After saving, the connection is established.

connection established

All saved connections are located under "Servers". They can be started with a double click or edited and terminated via the context menu.

disconnect or edit connection