Install PostgreSQL on Linux

Please note that the PostgreSQL is not an integral part of Intrexx. Detailed information on PostgreSQL can be found at the following link: 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. Find out here which versions of PostgreSQL databases are supported by Intrexx.

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, you can use the "yast" or "yast2" system program, for example. There you must then install the packages "postgresql" (clients and utilities) and "postgresql-server" (server). We also recommend "pgadmin3" for database administration if a desktop environment is available on the server. If you only have the command line available, you can also install PostgreSQL as the root user as follows:

            zypper install postgresql postgresql-server 

        

The PostgreSQL DB will thereby be initialized. The two configuration files "postgresql.conf" and "pg_hba.conf" must then be adapted. (Ubuntu users do not need to make this adjustment). To do this, a suitable editor will be required – for example, Nano. If not available, you can install Nano 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 (#) in front of the following entry:

            #listen_addresses ='localhost'

        

After removal, the entry looks like this:

            listen_addresses = 'localhost'

        

Also remove the hashtag (#) in front of the following entry:

            #port = 5432

        

After removal, the entry looks 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 the "ident" behind it with "md5" if md5 is not already stored as 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 "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 you want to change the password for the "postgres" user, use the following command:

            ALTER USER postgres PASSWORD 'Password'; 

        

After a successful update, exit the psql terminal (not the terminal window!) with the command "\q" and "exit". If the procedure described above does not work, try making the change in the terminal with the following commands:

            sudo -u postgres psql
\password postgres