Back Up Your Ranger Configuration Directories
Ranger Admin
mv /etc/ranger/admin/conf /etc/ranger/admin/conf.saved
ln -s /usr/hdp/current/ranger-admin/conf /etc/ranger/admin/conf
ls -la /etc/ranger/admin/
Ranger Usersync
mv /etc/ranger/usersync/conf /etc/ranger/usersync/conf.saved
ln -s /usr/hdp/current/ranger-usersync/conf /etc/ranger/usersync/conf
ls -la /etc/ranger/usersync
On the Ranger host, update the Ranger Admin install properties file:
vi /usr/hdp/2.3.x.y-z/ranger-admin/install.properties
using 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.properties
to the following directory:/usr/hdp/2.3.x.y-z/ranger-admin/ews/lib
Copy the
ranger-admin-default-site.xml
file: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/conf
Copy the
security-applicationContext.xml
file: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/conf
On 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-admin
export JAVA_HOME=/usr/jdk64/jdk1.7.0_67
On 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 -q
python /usr/hdp/2.3.x.y-z/ranger-admin/db_setup.py
From Ambari Web UI, select
Ranger > Summary
and click on theRanger Admin
component link. ChooseStart
from theRanger Admin
drop-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 -javapatch
Create 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-usersync
From Ambari Web UI, select
Ranger > Summary
and click on the Ranger UserSync component link. ChooseStart
from theRanger UserSync
drop-down menu.Choose Ok to confirm Ranger UserSync start.
From Ambari Web UI, select
Ranger
and chooseRestart All
from theService Actions
menu.After Ranger has started, select
Run Service Check
from theService Actions
menu. Confirm the Service Check passes.