This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Page tree
Skip to end of metadata
Go to start of metadata

 

This documentation provides the necessary steps to do a manual reinstallation of ranger-admin in Ranger 0.5.0. Sometime if we wanted to have a fresh ranger-admin installation, to clean up the usersync or to have a brand new ranger-admin to work on, the following options are there to work on.

 The following step are to be followed to re-install ranger-admin.  

 

Option 1: This option is to remove the ranger schemas from the database, reinstall the ranger-admin and start the ranger-admin/ ranger- usersync via Ambari.

  1. Update below properties in file /usr/hdp/<version>/ranger-admin/install.properties
    • DB_FLAVOR
    • SQL_CONNECTOR_JAR
    • db_root_user
    • db_root_password
    • db_host
    • db_name
    • db_user
    • db_password
    • audit_db_name
    • audit_db_user
    • audit_db_password
    • policymgr_external_url
  2. Export below env variable
    • export RANGER_ADMIN_HOME=/usr/hdp/<version>/ranger-admin
    • export JAVA_HOME=/usr/jdk64/jdk1.7.0_67
  3. Run python /usr/hdp/<version>/ranger-admin/dba_script.py -q
  4. Run python /usr/hdp/<version>/ranger-admin/db_setup.py
  5. From ambari update the new values for corresponding above properties(point 1) in DB Settings accordion in Ranger config.
  6. User can also check test connection with new db name given in point 1) using Test Connection Button.
  7. From ambari start Ranger Admin component.
  8. Run python /usr/hdp/<version>/ranger-admin/db_setup.py -javapatch
  9. Then start Ranger Usersync component from ambari.
  10. Once these steps are done, finally restart Ranger service and then do Ranger service check from ambari.

 

Option 2: This option is to remove the Ranger Service from Ambari and reinstall via Ambari.  You must save the Ranger-admin , Ranger- Usersync configuration you already have 

               

  1. Delete the Ranger component from Amabri 
    1. curl --user admin:admin -i  -H "X-Requested-By: ambari" -X DELETE http://`hostname -f`:8080/api/v1/clusters/cl1/services/RANGER
  2. Delete ranger db from the databases.
  3. After deleting , reinstall ranger component via Amabri.
  • No labels