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

  1. 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.
  2. 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
  3. Install the new version of Sentry.
  4. (From a release earlier than CDH 5.2.0 to CDH 5.2.0 or later) 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.
  5. Start the Sentry Service
    1. Set the SENTRY_HOME and HADOOP_HOME parameters.
    2. Run the following command:
      bin/sentry --command service --conffile <sentry-site.xml>