Install PostgreSQL on Linux

Please note that the PostgreSQL is not an integral part of Intrexx. More information about PostgreSQL is available here: https://www.postgresql.org/

PostgreSQL installation

To use PostgreSQL as the database for Intrexx, it needs to be installed - together with the relevant system tools - as a component of the current Linux distribution afterwards. You can find out more about which versions of PostgreSQL databases are supported by Intrexx here.

Ubuntu/Debian

Use the Software Centeron on Ubuntu, or the Synaptic Package Manager, in Debian. Alternatively, you can install PostgreSQL via the terminal. Enter the following command to do so:

sudo apt-get install postgresql

To use the PostgreSQL database, you need to initialize it. Enter the following command in the terminal to do this:

sudo service postgresql start

Fedora/RedHat

Open the terminal as the root user and enter the following command:

yum install postgresql postgresql-server

SuSE

With SuSE Linux, use (for example) the system program "yast" or "yast2". There you will additionally need to install the packages "postgresql" (Clients and Utilities) and "postgresql-server" (Server). It is also recommended that "pgadmin3" is installed to manage the databases, provided a desktop environment is available on the server. If you only have the command line available, you can install PostgreSQL as the root user in the following manner:

zypper install postgresql postgresql-server 

The PostgreSQL DB will thereby be initialized. Subsequently, the two configuration files "postgresql.conf" and "pg_hba.conf" must be amended as follows (Ubuntu users do not need to make this adjustment). To do this, a suitable editor will be required – for example, Nano. If Nano is not already available, you can install it as follows:

  • Debian/Ubuntu

    apt-get install nano

  • Fedora/RedHat

    yum install nano

  • SuSE

    zypper install nano

PostgreSQL configuration

postgresql.conf

Open the postgresql.conf file in an editor:

nano /etc/postgresql/13/main/postgresql.conf

Navigate to the "Connections and Authentication" entry.

Remove the hashtag (#) before the following entry:

#listen_addresses ='localhost'

Once removed, the entry will look like this:

listen_addresses = 'localhost'

Remove the hashtag (#) before the following entry as well:

#port = 5432

Once removed, the entry will look like this:

port = 5432

In some cases, the hashtag is already removed in the distributed file.

In some older SuSE versions, the entry "tcpip" must also be set to "true":

tcpip_socket = true

Afterwards, save the configuration file with CTRL+O and leave the editor with CTRL+X.

pg_hba.conf

Open the pg_hba.conf file in an editor:

nano /etc/postgresql/13/main/pg_hba.conf

Navigate to the end of the file to the following entry:

host all 127.0.0.1/32...

Replace "ident" with "md5" if md5 is not already the default value.

Then save the file and close the editor. To activate the changes made, you need to restart the postgresql service. Enter the following command in the terminal to do this:

service postgresql restart

Add user

After that, you need to add another user. This user will be used later by Intrexx to create the database. To do this, login to the PostgreSQL database with the following commands:

sudo su postgres

Now call up the PostgreSQL terminal with the user "postgres" and the default database template "template1".

psql -U postgres template1 

The following message should now be displayed:

This is psql <VERSION>, the interactive PostgreSQL terminal.
Please enter:  
\copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
template1=#

You can now create the user (and a freely definable password) for Intrexx with the following command:

CREATE USER intrexx PASSWORD 'Password' createdb; 

If the password for the user "postgres" should be changed, please use the following command:

ALTER USER postgres PASSWORD 'Password'; 

Following a successful update, exit the psql Terminal (not the terminal window!) using the commands "\q" and "exit". If the method described above does not work, please try making the change in the terminal with the following commands:

sudo -u postgres psql
\password postgres