Adding the Sentry Service Using Cloudera Manager

On the Home > Status tab, click to the right of the cluster name and select Add a Service. A list of service types display. You can add
one type of service at a time.

Select the Sentry service and click Continue.

Customize role assignments for Sentry. The wizard evaluates the hardware configurations of the available hosts and selects the best hosts for each role. If you are happy with the
preselected hosts, click Continue and move to the next step. Otherwise, you can change the hosts that are assigned to the roles. The View By
Host button allows you to view a list of hosts.

To change the host for a role, click the hostname under the role. A window appears with a list of hosts to choose from. Note that you can only select one host for the Sentry Server. You
can search for a host in the Search field or you can filter the list by entering a range of hosts in the Search field. You can search for hosts in the following ways:

Click Search to filter the list and click a hostname to select the host. Click OK to close the window. The hostname that you
selected appears under the role.

Click Continue to move to the next page in the wizard.

Configure database settings. You can use either an embedded or a custom database.

Choose the database type:

Leave the default setting of Use Embedded Database to have Cloudera Manager create and configure required databases. Make a note of the auto-generated
passwords.

Select Use Custom Databases to specify external databases.

Enter the database host, database type, database name, username, and password for the database that you created when you set up the database. See
the Creating Databases documentation for Sentry Server database requirements.

Click Test Connection to confirm that Cloudera Manager can communicate with the database using the information you
have supplied. If the test succeeds in all cases, click Continue; otherwise check and correct the information you have provided for the database and then try the test
again. (For some servers, if you are using the embedded database, you will see a message saying the database will be created at a later step in the installation process.) The Review Changes page
displays.

Verify the new service is started properly by checking the health status for the new service. If the Health Status is Good, then the service started
properly.

To use the Sentry service, begin by enabling Hive and Impala for the service.

Installing Sentry Using the Command Line

Use the following the instructions, depending on your operating system, to install the latest version of Sentry.
Important:Configuration files

If you install a newer version of a package that is already on the system, configuration files that you have modified will remain intact.

If you uninstall a package, the package manager renames any configuration files you have modified from <file> to <file>.rpmsave. If you then re-install the package (probably to install a new version) the package manager creates a new <file> with
applicable defaults. You are responsible for applying any changes captured in the original configuration file to the new configuration file. In the case of Ubuntu and Debian upgrades, you will be
prompted if you have made changes to a file for which there is a new version; for details, see Automatic handling of configuration files by dpkg.

OS

Command

RHEL

$ sudo yum install sentry

SLES

$ sudo zypper install sentry

Ubuntu or Debian

$ sudo apt-get update;
$ sudo apt-get install sentry

Starting the Sentry Service

Perform the following steps to start the Sentry service on your cluster.

Set the SENTRY_HOME and HADOOP_HOME parameters.

Create the Sentry database schema using the Sentry schematool. Sentry, by default, does not initialize the schema. The schematool is a built-in way for you to deploy the backend schema
required by the Sentry service. For example, the following command uses the schematool to initialize the schema for a MySQL database.

Upgrading the Sentry Service

Upgrading the Sentry Service Using Cloudera Manager

If you have a cluster managed by Cloudera Manager, go to Upgrading CDH and Managed Services Using Cloudera Manager and
follow the instructions depending on the version of CDH you are upgrading to. If you are upgrading from CDH 5.1, you will notice an extra step in the procedure to upgrade the Sentry database
schema.

For command-line instructions, continue reading.

Upgrading the Sentry Service Using the Command Line

Stop the Sentry service by identifying the PID of the Sentry Service and use the kill command to end the process:

If this documentation includes code, including but not limited to, code examples, Cloudera makes this available to you under the terms of the Apache License, Version 2.0, including any required
notices. A copy of the Apache License Version 2.0 can be found here.