Prerequisite

To manage Red Hat Middleware servers with CloudForms, the following pieces are required to be properly installed

  1. Red Hat CloudForms

  2. Red Hat Entrerprise Linux with Docker

  3. A PostgreSQL Server

Installing Red Hat CloudForms Server 4.2

To install Red Hat CloudForms Server, please refer to its installation guide

Installing Red Hat Enterprise Linux 7.2 or higher

To run the Middleware Manager, a successful installation of RHEL 7.2 or higher is required. The machine needs to be registered. Please refer to the Red Hat Enterprise Linux installation guide.

To register and add extra repositories for Docker support:

subscription-manager register --username=<rhnuser> --password=<pwd>
subscription-manager list --available
subscription-manager attach --pool=<pool_id>
subscription-manager repos --enable=rhel-7-server-extras-rpms

Install docker and needed dependencies:

yum install docker

Start the docker service:

systemctl start docker

Enable the docker service:

systemctl enable docker

Installing PostgreSQL Server 9.5

Unless you already have a running PostgreSQL 9.5 Server installed, you will need to install it.

To install PostgreSQL on a RHEL machine, make sure to enable the software collection 2.2 repository to get the required version of PostgreSQL.

subscription-manager repos --enable rhel-server-rhscl-7-rpms

Then install the server with:

yum install rh-postgresql95
scl enable rh-postgresql95 'postgresql-setup --initdb'
systemctl enable rh-postgresql95-postgresql
systemctl start rh-postgresql95-postgresql

Open the firewall for PostgreSQL remote connections:

firewall-cmd --permanent --add-port=5432/tcp
firewall-cmd --add-port=5432/tcp

Edit /var/opt/rh/rh-postgresql95/lib/pgsql/data/postgresql.conf to allow remote connections. Add the following line:

postgresql.conf
listen_addresses = '*'

Edit /var/opt/rh/rh-postgresql95/lib/pgsql/data/pg_hba.conf to allow a user to connect to the mwmanager database. Add the following line:

Replace my_db_username with the value of your choice .pg_hba.conf

host   mwmanager   my_db_username   0.0.0.0/0   md5

Then restart PostgreSQL

systemctl restart rh-postgresql95-postgresql

Create the mwmanager database:

su postgres
scl enable rh-postgresql95 'psql'

Replace my_db_username with the value chosen in pg_hba.conf and my_db_password with the value of your choice:

postgres=# CREATE USER my_db_username WITH PASSWORD 'my_db_password';
postgres=# CREATE DATABASE mwmanager OWNER my_db_username;

To verify, you can try to connect to the postgresql server remotely with:

psql -h my_db_host -U my_db_username -W -d mwmanager