Appendix E. Preparing a Local Manually-Configured PostgreSQL Database for Use with the Red Hat Virtualization Manager
engine-setup, creates and configures the Manager database locally on the Manager machine. For automatic database configuration, see Section 2.3, “Configuring the Red Hat Virtualization Manager”. To configure the Manager database on a machine that is separate from the machine where the Manager is installed, see Appendix D, Preparing a Remote PostgreSQL Database .
engine-setup. To set up the database, you must first install the rhevm package on the Manager machine; the postgresql-server package is installed as a dependency.
engine-backup --mode=restorecommands only support system error messages in the
en_US.UTF8locale, even if the system locale is different.
postgresql.conffile must be set to
Procedure E.1. Preparing a Local Manually-Configured PostgreSQL Database for use with the Red Hat Virtualization Manager
- Initialize the PostgreSQL database, start the
postgresqlservice, and ensure that this service starts on boot:
# su -l postgres -c "/usr/bin/initdb --locale=en_US.UTF8 --auth='ident' --pgdata=/var/lib/pgsql/data/" # systemctl start postgresql.service # systemctl enable postgresql.service
- Connect to the psql command line interface as the
# su - postgres $ psql
- Create a user for the Manager to use when it writes to and reads from the database. The default user name on the Manager is
postgres=# create role user_name with login encrypted password 'password';
- Create a database in which to store data about the Red Hat Virtualization environment. The default database name on the Manager is
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 and add the
postgres=# \c database_name database_name=# CREATE LANGUAGE plpgsql;
- Ensure the database can be accessed remotely by enabling md5 client authentication. Edit the
/var/lib/pgsql/data/pg_hba.conffile, and add the following line immediately underneath the line starting with
localat the bottom of the file:
host [database name] [user name] 0.0.0.0/0 md5 host [database name] [user name] ::0/0 md5
- Restart the
# systemctl restart postgresql.service