Upgrade Ranger
Back Up Your Ranger Configuration Directories
Ranger Admin
mv /etc/ranger/admin/conf /etc/ranger/admin/conf.savedln -s /usr/hdp/current/ranger-admin/conf /etc/ranger/admin/confls -la /etc/ranger/admin/Ranger Usersync
mv /etc/ranger/usersync/conf /etc/ranger/usersync/conf.savedln -s /usr/hdp/current/ranger-usersync/conf /etc/ranger/usersync/confls -la /etc/ranger/usersyncOn the Ranger host, update the Ranger Admin install properties file:
vi /usr/hdp/2.3.x.y-z/ranger-admin/install.propertiesusing the values from
/usr/hdp/2.2.x.y-z/ranger-admin/install.properties.The following table lists the HDP 2.2 property strings and the HDP 2.3 property labels for Ranger:
HDP 2.2 install.properties
HDP 2.3 Ambari Web UI > Property Names
DB_FLAVOR
DB Settings > DB FLAVOR
SQL_CONNECTOR_JAR
Admin Settings > Sql Connector Jar location
db_root_user
DB Settings > Ranger DB root user
db_root_password DB Settings > Ranger DB root password
db_host
DB Settings > Ranger DB host db_name
DB Settings > Ranger DB name
db_user
DB Settings > Ranger DB username
db_password
DB Settings > Ranger DB password audit_db_name
DB Settings > Ranger Audit DB name audit_db_user
DB Settings > Ranger Audit DB username audit_db_password
DB Settings > Ranger Audit DB password policymgr_external_url
Ranger Settings > External URL Copy the SQL_CONNECTOR_JAR from the location specified in in
install.propertiesto the following directory:/usr/hdp/2.3.x.y-z/ranger-admin/ews/libCopy the
ranger-admin-default-site.xmlfile:cp /usr/hdp/2.3.x.y-z/ranger-admin/ews/webapp/WEB-INF/classes/conf.dist/ranger-admin-default-site.xml /usr/hdp/2.3.x.y-z/ranger-admin/confCopy the
security-applicationContext.xmlfile:cp /usr/hdp/2.3.x.y-z/ranger-admin/ews/webapp/WEB-INF/classes/conf.dist/security-applicationContext.xml /usr/hdp/2.3.x.y-z/ranger-admin/confOn the Ranger admin/ Ranger user sync host, export the RANGER_ADMIN_HOME and JAVA_HOME environment variables.
export RANGER_ADMIN_HOME=/usr/hdp/2.3.x.y-z/ranger-adminexport JAVA_HOME=/usr/jdk64/jdk1.7.0_67On the Ranger host, run the following command:
chown -R ranger:ranger /usr/hdp/2.3.2.x-y/ranger-admin/On the Ranger host, run the Ranger Admin dba_script and db_setup python scripts, as follows:
python /usr/hdp/2.3.x.y-z/ranger-admin/dba_script.py -qpython /usr/hdp/2.3.x.y-z/ranger-admin/db_setup.pyFrom Ambari Web UI, select
Ranger > Summaryand click on theRanger Admincomponent link. ChooseStartfrom theRanger Admindrop-down menu.Choose Ok to confirm Ranger Admin start.
On the Ranger host, run the dba_setup patch script, as follows:
python /usr/hdp/2.3.x.y-z/ranger-admin/db_setup.py -javapatchCreate symbolic links and overwrite any existing destination files for the Ranger UserSync service.
ln -sf /usr/hdp/2.3.x.y-z/ranger-usersync/ranger-usersync-services.sh /usr/bin/ranger-usersyncFrom Ambari Web UI, select
Ranger > Summaryand click on the Ranger UserSync component link. ChooseStartfrom theRanger UserSyncdrop-down menu.Choose Ok to confirm Ranger UserSync start.
From Ambari Web UI, select
Rangerand chooseRestart Allfrom theService Actionsmenu.After Ranger has started, select
Run Service Checkfrom theService Actionsmenu. Confirm the Service Check passes.

