Prior to upgrading your cluster to Cloudera Private Cloud Base you must configure the PostgreSQL
database instance for Ranger by creating a Ranger database and user. Before
you begin the transition, review the support policies of database and admin
policy support for transactions.
- Log in to the host where you want to set up the PostgreSQL
database for Ranger.
-
On the PostgreSQL host, install the applicable PostgreSQL
connector:
RHEL/CentOS/Oracle
Linuxyum install postgresql-jdbc*
SLES
zypper install -y postgresql-jdbc
- Edit the
pg_hba.conf
file, located either in
the /var/lib/pgsql/data
or
/etc/postgresql/<version>/main
directory and add
the following line:
host all all 127.0.0.1/32 md5
If this file contains the line host all all 127.0.0.1/32
ident
, then
- Edit the
/var/lib/pgsql/data/postgresql.conf
file and add the following line if it is not already there: - Enable the PostgreSQL server to start automatically on
boot-up:
sudo systemctl enable postgresql
- Restart the PostgreSQL server:
sudo systemctl restart postgresql
- Log in to PostgreSQL:
sudo -u postgres psql postgres
-
Create the Ranger database and user. Run the following
commands:
create user rangeradmin with createdb login password 'rangeradmin';
create database ranger with owner rangeradmin;
GRANT ALL PRIVILEGES ON SCHEMA public TO rangeradmin;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO rangeradmin;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO rangeradmin;
-
Use the
\q
command to exit PostgresSQL.
Continue installing or upgrading your
cluster.