Installing and configuring PostgreSQL
Learn how to install and configure PostgreSQL for Edge Flow Manager.
For supported database versions, see System Requirements for Edge Flow Manager.
Install PostgreSQL
If you are using MySQL or MariaDB instead of PostgreSQL, you may skip these steps. See the
instructions for MySQL and MariaDB in the respective sections.
- Install Red Hat Package Manager (RPM) according to the requirements of your operating
system:
sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
- Install PostgreSQL version 9.6:
yum install postgresql96-server postgresql96-contrib postgresql96
- Initialize the database:
For example, if you are using CentOS 7, use the following syntax:
/usr/pgsql-9.6/bin/postgresql96-setup initdb
- Start PostgreSQL. For example, if you are using CentOS 7, use the following syntax:
systemctl enable postgresql-9.6.service systemctl start postgresql-9.6.service
- Verify that you can log in:
sudo su postgres psql
Configure PostgreSQL to allow remote connections
It is critical that you configure PostgreSQL to allow remote connections before you deploy Edge Flow Manager. If you do not perform these steps in advance of installing
the Edge Flow Manager server, the installation fails.
- Open /var/lib/pgsql/9.6/data/pg_hba.conf and update to the
following:
# "local" is for Unix domain socket connections only local all all trust # IPv4 local connections: host all all 0.0.0.0/0 trust # IPv6 local connections: host all all ::/0 trust
- Open /var/lib/pgsql/9.6/data/postgresql.conf and update to the
following:
listen_addresses = '*'
- Restart PostgreSQL.
systemctl stop postgresql-9.6.service systemctl start postgresql-9.6.service
Configure PostgreSQL for use by Edge Flow Manager
- Log in to PostgreSQL:
sudo su postgres psql
- Create a database for the EFM service to use:
create database efm; CREATE USER efm WITH PASSWORD 'efmPassword'; GRANT ALL PRIVILEGES ON DATABASE "efm" to efm;
Configure the Edge Flow Manager database properties
- Configure the database properties in the
efm.properties
file:efm.db.url=jdbc:postgresql://localhost:5432/efm efm.db.driverClass=org.postgresql.Driver efm.db.username=efm efm.db.password=efmPassword
The URL should match the host and port of the machine running PostgreSQL. The password should match the value that you set using the following command:CREATE USER efm WITH PASSWORD 'efmPassword';