Configuring the SQL Database (PostgreSQL) on the Cloud ControllerOptionally, if you choose not to use MySQL, you can install
and configure PostgreSQL for all your databases. Here's a
walkthrough for the Nova database:$sudo apt-get install postgresql postgresql-client$sudo yum install postgresql postgresql-server$zypper install postgresql postgresql-serverStart the PostgreSQL command line client by running:sudo su - postgresEnter the postgresql root user's password if prompted.To configure the database, create the nova database.postgres> psql
postgres=# CREATE USER novadbadmin;
postgres=# ALTER USER novadbadmin WITH PASSWORD '[YOUR_NOVADB_PASSWORD]';
postgres=# CREATE DATABASE nova;
postgres=# GRANT ALL PRIVILEGES ON DATABASE nova TO novadbadmin;
postgres=# \q
postgres> exitThe database is created and we have a privileged user that
controls the database. Now we have to install the packages that
will help Nova access the database.$sudo apt-get install python-sqlalchemy python-psycopg2$sudo yum install python-sqlalchemy python-psycopg2$sudo zypper install python-SQLAlchemy python-psycopg2Configure the /etc/nova/nova.conf file,
to ensure it knows to use the PostgreSQL database:[database]
connection = postgres://novadbadmin:[[YOUR_NOVADB_PASSWORD]]@127.0.0.1/novaThe command to populate the database is described later in the
documentation, in the section entitled Configuring the Database for Compute.