Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Celebrating as our community reaches 100,000 members! Thank you!
Labels (1)
avatar

prerequisites:

1) You must have an MySQL Server database instance running to be used by Ranger.

2) Execute the following command on the Ambari Server host. Replace database-type with mysql|oracle|postgres|mssql|sqlanywhere and /jdbc/driver/path based on the location of corresponding JDBC driver:

ambari-server setup --jdbc-db={database-type} --jdbc-driver={/jdbc/driver/path}

3) make sure root user have access to the db from ranger host and ranger kms host.

eg: your ranger host is ranger.host.com & ranger kms host is ranger.kms.host.com then you should run following command on the mysql database:

GRANT ALL ON *.* TO 'root'@'ranger.host.com' IDENTIFIED BY '<root_password>' WITH GRANT OPTION; GRANT ALL ON *.* TO 'root'@'ranger.kms.host.com' IDENTIFIED BY '<root_password>' WITH GRANT OPTION; flush privileges;

Steps:

1) go to the ambari and go to the add service wizard

2) select the ranger and ranger kms host

3) make sure you fill following properties carefully in Ranger & Ranger KMS both:

DB_FLAVOR = mysql     
Ranger DB host = <db_host> eg: test.mysql.com     
Setup Database and Database User = yes     
Database Administrator (DBA) username = root     
Database Administrator (DBA) password = <root_password> 

64588-screen-shot-2018-03-13-at-64721-pm.png

4) any name can be configured to following db or user properties as they will be created by root user as fresh database or user since we selected "Setup Database and Database User" to yes

Ranger DB name = ranger
Ranger DB username = rangeradmin     
Ranger DB password = rangeradmin 

64589-screen-shot-2018-03-13-at-64730-pm.png

5) Ranger KMS has an additional property:

KMS master key password: <kms_password> , this is also newly configured password of your choice.

64590-screen-shot-2018-03-13-at-64925-pm.png

6)) audit can configured based on your choice if you want audit for service operations,

64591-screen-shot-2018-03-13-at-64839-pm.png

Note: I have not given details of all the properties in this article because these are the important properties where people make mistakes.

,

2,275 Views