Before You Begin

If you have already installed a MySQL database, you may skip these steps.

You must install Postgres 9.5 or later for SAM and Schema Registry. Ambari does not install Postgres 9.5, so you must perform a manual Postgres installation.

Steps

  1. Install Red Hat Package Manager (RPM) according to the requirements of your operating system:

    1. yum install https://yum.postgresql.org/9.6/redhat/rhel-7-x86_64/pgdg-redhat96-9.6-3.noarch.rpm
  2. Install Postgres version 9.5 or later:

    1. yum install postgresql96-server postgresql96-contrib postgresql96
  3. Initialize the database:

    • For CentOS 7, use the following syntax:

      1. /usr/pgsql-9.6/bin/postgresql96-setup initdb
    • For CentOS 6, use the following syntax:

      1. sudo service postgresql initdb
  4. Start Postgres.

    For example, if you are using CentOS 7, use the following syntax:

    1. systemctl enable postgresql-9.6.service
    2. systemctl start postgresql-9.6.service
  5. Verify that you can log in:

    1. sudo su postgres
    2. psql