Creating Databases for CDP

You must create databases and service accounts for components that require databases.

The following components require databases:

  • Cloudera Manager Server
  • Cloudera Management Service roles:
  • Reports Manager
  • Hue
  • Each Hive metastore
  • Oozie
  • Data Analytics Studio
  • Ranger

The databases must be configured to support the PostgreSQL UTF8 character set encoding.

Record the values you enter for database names, usernames, and passwords. The Cloudera Manager installation wizard requires this information to correctly connect to these databases.

To create databases for Cloudera Manager Server, Cloudera Management Service roles, Activity Monitor, Reports Manager, Hue, Hive metastores, Oozie, and DAS, complete the following steps:

  1. Connect to PostgreSQL:
    sudo -u postgres psql
  2. Create databases for each service you are using from the below table:
    CREATE ROLE <user> LOGIN PASSWORD '<password>';
    CREATE DATABASE <database> OWNER <user> ENCODING 'UTF8';
    You can use any value you want for <database>, <user>, and <password>. The following examples are the default names provided in the Cloudera Manager configuration settings, but you are not required to use them:
    Table 1. Databases for Cloudera Software
    Service Database User
    Cloudera Manager Server scm scm
    Activity Monitor amon amon
    Reports Manager rman rman
    Hue hue hue
    Hive Metastore Server metastore hive
    Oozie oozie oozie
    Data Analytics Studio das das

    Record the databases, usernames, and passwords chosen because you will need them later.

If you plan to use Apache Ranger, see the following topic for instructions on creating and configuring the Ranger database.

After you install and configure PostgreSQL databases for Cloudera software, continue to Step 5: Set up the Cloudera Manager Database to configure a database for Cloudera Manager.