ThingWorx Flow > Installation and Configuration > Installing ThingWorx Flow > ThingWorx Flow Prerequisites for PostgreSQL
ThingWorx Flow Prerequisites for PostgreSQL
The following sections provide information about the prerequisites that you need to set before you install ThingWorx Flow:
Prerequisites for Windows Server 2016, Windows Server 2019 with PostgreSQL
Windows Server 2016/ 2019 with Administrator access.
<JAVA_HOME>/bin added to the PATH environment variable.
A local or remote database connection for ThingWorx Flow. The following table provides the prerequisites that you need to set:
Database Connection
Prerequisites
Local database connection
PostgreSQL installed, and the path to PostgreSQL/bin should be in the PATH environment variable.
The host on which ThingWorx Flow is to be installed must have access to the PostgreSQL server.
Updated the pg_hba.conf file to allow connections to PostgreSQL from the ThingWorx Flow host.
For example, if ThingWorx Flow is installed on the same host as PostgreSQL, update the pg_hba.conf file to set the password authentication method to md5, password, or trust. However, trust is not recommended.
The following is an example of the pg_hba.conf file with password authentication set to md5:
$ Edit pg_hba.conf for following:
...
# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
For more information about the pg_hba.conf file, see this link.
Remote database connection
Install the psql client that is compatible with your PostgreSQL version.
Add the installed psql to the PATH environment variable. You can follow these steps:
a. Download pgadmin4-5.1-x64.exe from https://www.pgadmin.org/download/.
b. Install the pgadmin client.
c. Update the PATH environment variable to append to the path where the pgadmin client is installed.
Use the existing ThingWorx Foundation database or create a separate database for ThingWorx Flow. Ensure that you have not used this database for a previous ThingWorx Flow installation. For ThingWorx Flow, you must set the following configuration settings on the database:
Set Allow Connections? to Yes.
Set Encoding to UTF-8.
Set Tablespace to pg_default.
Set Collation to your UTF-8 collation.
Set Character type to UTF-8 character type.
Set Connection limit to -1.
Set Template? to No.
Ensure that your database user has the following settings and privileges:
Create a Login Role for the PostgreSQL database server. The username and password for this Login Role provide the ThingWorx Flow Database Login Username and the ThingWorx Flow Database Login Password.
Set the login database user as the owner of the database.
Set Can login? to Yes.
Grant all privileges on the database to this Login Role username.
From your PosgreSQL database, note the following values:
PostgreSQL IP Address or Host Name
PostgreSQL Port
ThingWorx Flow Database Name
ThingWorx Flow Database Login Username
ThingWorx Flow Database Login Password
Prerequisites for Red Hat Enterprise Linux 7.5, 7.6, 8.0, 8.1, or 8.2 with PostgreSQL
* 
Ensure that you are installing ThingWorx Flow on the supported version of Red Hat Enterprise Linux. For more information, see Supported operating systems.
Red Hat Enterprise Linux 7.5, 7.6, 8.0, 8.1, or 8.2 with Administrator access.
For Red Hat Enterprise Linux 8.0, 8.1, or 8.2, ensure that you register and subscribe a system to the Red Hat Customer Portal using Red Hat Subscription Manager.
In the /etc/selinux/config file, set SELINUX=enforcing, and restart the machine.
Run the following commands to enable Software Collections:
For Red Hat Enterprise Linux 7.5, 7.6
yum-config-manager --enable 'Red Hat Enterprise Linux Server 7 RHSCL (RPMs)'
yum-config-manager --enable 'Red Hat Enterprise Linux Server 7 Extra(RPMs)'
yum-config-manager --enable 'Red Hat Enterprise Linux Server 7 Optional (RPMs)'
yum-config-manager --enable 'Red Hat Enterprise Linux Server 7 RH Common (RPMs)'
yum-config-manager --enable 'Red Hat Enterprise Linux Server 7 Supplementary (RPMs)'
For Red Hat Enterprise Linux 8.0, 8.1, 8.2
yum install scl-utils scl-utils-build
Run the following commands to enable EPEL repository:
For Red Hat Enterprise Linux 7.5, 7.6
1. wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
2. yum localinstall epel-release-latest-7.noarch.rpm
For Red Hat Enterprise Linux 8.0, 8.1, 8.2
1. wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
2. yum localinstall epel-release-latest-8.noarch.rpm
<JAVA_HOME>/bin added to the PATH environment variable.
A local or remote database connection for ThingWorx Flow. The following table provides the prerequisites that you need to set:
Database Connection
Prerequisites
Local database connection
PostgreSQL installed, and the path to PostgreSQL/bin should be in the PATH environment variable.
The host on which ThingWorx Flow is to be installed must have access to the PostgreSQL server.
Updated the pg_hba.conf file to allow connections to PostgreSQL from the ThingWorx Flow host.
For example, if ThingWorx Flow is installed on the same host as PostgreSQL, update the pg_hba.conf file to set the password authentication method to md5, password, or trust. However, trust is not recommended.
The following is an example of the pg_hba.conf file with password authentication set to md5:
$ Edit pg_hba.conf for following:
...
# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
For more information about the pg_hba.conf file, see this link.
Remote database connection
Install the psql client that is compatible with your PostgreSQL version.
Use the existing ThingWorx Foundation database or create a separate database for ThingWorx Flow. Ensure that you have not used this database for a previous ThingWorx Flow installation. For ThingWorx Flow, you must set the following configuration settings on the database:
Set Allow Connections? to Yes.
Set Encoding to UTF-8.
Set Tablespace to pg_default.
Set Collation to your UTF-8 collation.
Set Character type to UTF-8 character type.
Set Connection limit to -1.
Set Template? to No.
Ensure that your database user has the following settings and privileges:
Create a Login Role for the PostgreSQL database server. The username and password for this Login Role provide the ThingWorx Flow Database Login Username and the ThingWorx Flow Database Login Password.
Set the login database user as the owner of the database.
Set Can login? to Yes.
Grant all privileges on the database to this Login Role username.
From your PosgreSQL database, note the following values:
PostgreSQL IP Address or Host Name
PostgreSQL Port
ThingWorx Flow Database Name
ThingWorx Flow Database Login Username
ThingWorx Flow Database Login Password
Was this helpful?