Appendix B. Preparing a Local Manually Configured PostgreSQL Database Use this procedure to set up the Manager database or Data Warehouse database with custom values. Set up this database before you configure the Manager; you must supply the database credentials during engine-setup . Note The engine-setup and engine-backup --mode=restore commands only support system error messages in the en_US.UTF8 locale, even if the system locale is different. The locale settings in the postgresql.conf file must be set to en_US.UTF8 . Important The database name must contain only numbers, underscores, and lowercase letters. Enabling the Red Hat Virtualization Manager Repositories Register the system with Red Hat Subscription Manager, attach the Red Hat Virtualization Manager subscription, and enable Manager repositories. Procedure Register your system with the Content Delivery Network, entering your Customer Portal user name and password when prompted: Note If you are using an IPv6 network, use an IPv6 transition mechanism to access the Content Delivery Network and subscription manager. Find the Red Hat Virtualization Manager subscription pool and record the pool ID: Use the pool ID to attach the subscription to the system: Note To view currently attached subscriptions: To list all enabled repositories: Configure the repositories: Initializing the PostgreSQL Database Install the PostgreSQL server package: Initialize the PostgreSQL database, start the postgresql service, and ensure that this service starts on boot: Connect to the psql command line interface as the postgres user: Create a default user. The Manager's default user is engine and Data Warehouse's default user is ovirt_engine_history : Create a database. The Manager's default database name is engine and Data Warehouse's default database name is ovirt_engine_history : Connect to the new database: Add the uuid-ossp extension: Add the plpgsql language if it does not exist: Quit the psql interface: Ensure the database can be accessed remotely by enabling md5 client authentication. Edit the /var/opt/rh/rh-postgresql10/lib/pgsql/data/pg_hba.conf file, and add the following line immediately underneath the line starting with local at the bottom of the file, replacing X.X.X.X with the IP address of the Manager or the Data Warehouse machine, and 0-32 or 0-128 with the CIDR mask length: Update the PostgreSQL server's configuration. Edit the /var/opt/rh/rh-postgresql10/lib/pgsql/data/postgresql.conf file and add the following lines to the bottom of the file: Restart the postgresql service: Optionally, set up SSL to secure database connections using the instructions at http://www.postgresql.org/docs/10/static/ssl-tcp.html#SSL-FILE-USAGE . Return to Section 3.3, "Installing and Configuring the Red Hat Virtualization Manager" , and answer Local and Manual when asked about the database.

Commands:
subscription-manager register
subscription-manager list --available
subscription-manager attach --pool= pool_id
subscription-manager list --consumed
yum repolist
subscription-manager repos --disable='*' --enable=rhel-7-server-rpms --enable=rhel-7-server-supplementary-rpms --enable=rhel-7-server-rhv-4.3-manager-rpms --enable=rhel-7-server-rhv-4-manager-tools-rpms --enable=rhel-7-server-ansible-2.9-rpms --enable=jb-eap-7.2-for-rhel-7-server-rpms
yum install rh-postgresql10 rh-postgresql10-postgresql-contrib
scl enable rh-postgresql10 -- postgresql-setup --initdb systemctl enable rh-postgresql10-postgresql systemctl start rh-postgresql10-postgresql
su - postgres -c 'scl enable rh-postgresql10 -- psql'
postgres=# create role user_name with login encrypted password ' password ';
postgres=# create database database_name owner user_name template template0 encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';
postgres=# \c database_name
database_name =# CREATE EXTENSION "uuid-ossp";
database_name =# CREATE LANGUAGE plpgsql;
database_name =# \q
host database_name user_name X.X.X.X/0-32 md5 host database_name user_name X.X.X.X::/0-128 md5
autovacuum_vacuum_scale_factor=0.01 autovacuum_analyze_scale_factor=0.075 autovacuum_max_workers=6 maintenance_work_mem=65536 max_connections=150 work_mem=8192
systemctl restart rh-postgresql10-postgresql