Installing PostgreSQL on Linux

Please note that PostgreSQL is not an integral part of Intrexx. You can find detailed information about PostgreSQL at the following link, among others: https://www.postgresql.org/

PostgreSQL Installation

To use the PostgreSQL database in conjunction with Intrexx, it must be installed using the appropriate system tools as part of any standard Linux distribution. Find out here which versions of PostgreSQL databases are supported by Intrexx.

Ubuntu/Debian

Use the Software Center in Ubuntu or the Synaptic Package Manager in Debian. Alternatively, you can install PostgreSQL via the terminal. To do this, enter the following command:

sudo apt-get install postgresql

To use the PostgreSQL database, you must initialize it. To do this, enter the following command in the Terminal:

sudo service postgresql start

Fedora/Red Hat

Open the Terminal and enter the following commands as the root user:

yum install postgresql postgresql-server

SuSE

In SuSE Linux, you can use the system program "yast" or "yast2," for example. There, you'll need to install the "postgresql" (clients and utilities) and "postgresql-server" (server) packages as well. We also recommend using "pgadmin3" for database administration, provided that a desktop environment is available on the server. If you only have access to the command line, you can also install PostgreSQL as the root user as follows:

zypper install postgresql postgresql-server

The PostgreSQL database is then initialized. Next, the two configuration files, "postgresql.conf" and "pg_hba.conf," must be modified. Ubuntu users do not need to make this configuration. To make the changes, you'll need a suitable editor, such as Nano. If it is not already installed, you can install Nano as follows:

  • Debian/Ubuntu

    apt-get install nano

  • Fedora/Red Hat

    yum install nano

  • SuSE

    zypper install nano

PostgreSQL Configuration

postgresql.conf

Open the postgresql.conf file in a text editor:

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

Navigate to the "Connections and Authentication" entry.

Remove the hashtag (#) from the following entry:

#listen_addresses ='localhost'

After removal, the entry looks like this:

listen_addresses = 'localhost'

Also remove the hashtag (#) before the following entry:

#port = 5432

After removal, the entry looks like this:

port = 5432

If necessary, the hashtag has already been removed from the delivered file.

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

tcpip_socket = true

Then save the configuration file using the CTRL+O shortcut and exit the editor using the CTRL+X shortcut.

pg_hba.conf

Open the pg_hba.conf file in a text editor:

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

Scroll to the end of the file until you reach the following entry:

host all 127.0.0.1/32...

Replace "ident" with "scram-sha-256" if "scram-sha-256" is not already set as the default value.

Then save the file and exit the editor. To apply the changes you've made, you must restart the postgresql service. To do this, enter the following command in the Terminal:

service postgresql restart

Add a user

Next, you'll need to add another user. Intrexx will use this later to create the database. To do this, log in to the PostgreSQL database using the following commands:

sudo su postgres

Now open the PostgreSQL terminal using the "postgres" user and the default database "template1."

psql -U postgres template1 

The following message should 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 password of your choice) for Intrexx using the following command:

CREATE USER intrexx PASSWORD 'Password' createdb; 

If you want to change the password for the "postgres" user, use the following command:

ALTER USER postgres PASSWORD 'Password'; 

After the update is complete, exit the psql terminal (not the terminal window!) using the commands "\q" and "exit". If the procedure described above does not work, try making the change in Terminal using the following commands:

sudo -u postgres psql
\password postgres