Appendix B. Preparing a Local Manually Configured PostgreSQL Database Use this procedure to set up the Manager database. 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 You need to log in and register the Manager machine with Red Hat Subscription Manager, attach the Red Hat Virtualization Manager subscription, and enable the Manager repositories. Procedure Register your system with the Content Delivery Network, entering your Customer Portal user name and password when prompted: # subscription-manager register 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: # subscription-manager list --available Use the pool ID to attach the subscription to the system: # subscription-manager attach --pool= pool_id Note To view currently attached subscriptions: # subscription-manager list --consumed To list all enabled repositories: # dnf repolist Configure the repositories: # subscription-manager repos \ --disable='*' \ --enable=rhel-8-for-x86_64-baseos-eus-rpms \ --enable=rhel-8-for-x86_64-appstream-eus-rpms \ --enable=rhv-4.4-manager-for-rhel-8-x86_64-rpms \ --enable=fast-datapath-for-rhel-8-x86_64-rpms \ --enable=jb-eap-7.4-for-rhel-8-x86_64-rpms \ --enable=openstack-16.2-cinderlib-for-rhel-8-x86_64-rpms \ --enable=rhceph-4-tools-for-rhel-8-x86_64-rpms \ --enable=rhel-8-for-x86_64-appstream-tus-rpms \ --enable=rhel-8-for-x86_64-baseos-tus-rpms Set the RHEL version to 8.6: # subscription-manager release --set=8.6 Enable version 12 of the postgresql module. # dnf module -y enable postgresql:12 Enable version 14 of the nodejs module: # dnf module -y enable nodejs:14 Synchronize installed packages to update them to the latest available versions. # dnf distro-sync --nobest Additional resources For information on modules and module streams, see the following sections in Installing, managing, and removing user-space components Module streams Selecting a stream before installation of packages Resetting module streams Switching to a later stream Initializing the PostgreSQL Database Install the PostgreSQL server package: # dnf install postgresql-server postgresql-contrib Initialize the PostgreSQL database instance: 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 : postgres=# create role user_name with login encrypted password ' password '; Create a database. The Manager's default database name is engine and Data Warehouse's default database name is ovirt_engine_history : postgres=# create database database_name owner user_name template template0 encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8'; Connect to the new database: postgres=# \c database_name Add the uuid-ossp extension: database_name =# CREATE EXTENSION "uuid-ossp"; Add the plpgsql language if it does not exist: database_name =# CREATE LANGUAGE plpgsql; Quit the psql interface: database_name =# \q Edit the /var/lib/pgsql/data/pg_hba.conf file to enable md5 client authentication, so the engine can access the database locally. Add the following line immediately below the line that starts with local at the bottom of the file: host database_name user_name 0.0.0.0/0 md5 host database_name user_name ::0/0 md5 Update the PostgreSQL server's configuration. Edit the /var/lib/pgsql/data/postgresql.conf file and add the following lines to the bottom of the file: 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 Restart the postgresql service: # systemctl restart postgresql Optionally, set up SSL to secure database connections. Return to Configuring the 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
dnf repolist
subscription-manager repos --disable='*' --enable=rhel-8-for-x86_64-baseos-eus-rpms --enable=rhel-8-for-x86_64-appstream-eus-rpms --enable=rhv-4.4-manager-for-rhel-8-x86_64-rpms --enable=fast-datapath-for-rhel-8-x86_64-rpms --enable=jb-eap-7.4-for-rhel-8-x86_64-rpms --enable=openstack-16.2-cinderlib-for-rhel-8-x86_64-rpms --enable=rhceph-4-tools-for-rhel-8-x86_64-rpms --enable=rhel-8-for-x86_64-appstream-tus-rpms --enable=rhel-8-for-x86_64-baseos-tus-rpms
subscription-manager release --set=8.6
dnf module -y enable postgresql:12
dnf module -y enable nodejs:14
dnf distro-sync --nobest
dnf install postgresql-server postgresql-contrib
postgresql-setup --initdb
systemctl enable postgresql systemctl start postgresql
su - postgres -c 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 0.0.0.0/0 md5 host database_name user_name ::0/0 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 postgresql