Sentry Installation
Sentry enables role-based, fine-grained authorization for HiveServer2 and Cloudera Impala. It provides classic database-style authorization for Hive and Impala. For more information, and instructions on configuring Sentry for Hive and Impala, see The Sentry Service.
Installing Sentry
Use the following the instructions, depending on your operating system, to install the latest version of Sentry.
OS | Command |
---|---|
RHEL |
$ sudo yum install sentry |
SLES |
$ sudo zypper install sentry |
Ubuntu or Debian |
$ sudo apt-get update; $ sudo apt-get install sentry |
Upgrading Sentry
Upgrading from CDH 5.x to the Latest CDH 5
- Stop the Sentry Service
To stop the Sentry service, identify the PID of the Sentry Service and use the kill command to end the process:
ps -ef | grep sentry kill -9 <PID>
Replace <PID> with the PID of the Sentry Service. - Remove the previous version of Sentry.
OS Command RHEL $ sudo yum remove sentry
SLES $ sudo zypper remove sentry
Ubuntu or Debian $ sudo apt-get remove sentry
- Install the new version of Sentry.
- (From a release earlier than CDH 5.2 to CDH 5.4) Upgrade Sentry Database Schema
Use the Sentry schematool to upgrade the database schema as follows:
bin/sentry --command schema-tool --conffile <sentry-site.xml> --dbType <db-type> --upgradeSchema
Where <db-type> should be either mysql, postgres or oracle. - Start the Sentry Service
- Set the SENTRY_HOME and HADOOP_HOME parameters.
- Run the following command:
bin/sentry --command service --conffile <sentry-site.xml>