Installing Ranger
This topic includes instructions for using package managers to download and install Ranger from the EEP repository.
To set up the EEP repository, see Step 11: Install Ecosystem Components Manually.
Prerequisites for Installing Ranger
- Create a user for Ranger in the database. Note that the user name and
password you specify in this step will be used for Ranger Admin configuration. The
following example is for MySQL; the commands can be different for other
databases:
mysql -uroot -p<root_password> CREATE USER 'ranger_user_name'@'localhost' IDENTIFIED BY 'ranger_user_password'; GRANT ALL PRIVILEGES ON *.* TO 'ranger_user_name'@'localhost' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO 'ranger_user_name'@'localhost' IDENTIFIED BY 'ranger_user_password' WITH GRANT OPTION; CREATE USER 'ranger_user_name'@'%' IDENTIFIED BY 'ranger_user_password'; GRANT ALL PRIVILEGES ON *.* TO 'ranger_user_name'@'%' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO 'ranger_user_name'@'%' IDENTIFIED BY 'ranger_user_password' WITH GRANT OPTION; CREATE USER 'ranger_user_name'@'FQDN' IDENTIFIED BY 'ranger_user_password'; GRANT ALL PRIVILEGES ON *.* TO 'ranger_user_name'@'FQDN' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO 'ranger_user_name'@'FQDN' IDENTIFIED BY 'ranger_user_password' WITH GRANT OPTION; FLUSH PRIVILEGES;
- Ensure that the database for Ranger is created by its user. The database
name that you specify in this step is used for Ranger Admin
configuration:
mysql -uranger_user_name -p ranger_user_password create database rangerdb;
- For SLES installations only: Install the
insserv-compat
package before setting up Ranger services:
Ranger uses System V initialization scripts to create the runtime directory. Installingsudo zypper install insserv-compat
insserv-compat
ensures that the installation is compatible with the initialization scripts.
Installing Ranger
On each planned Ranger node, install mapr-ranger
. Run the following
commands as the cluster admin (typically the mapr
user):
- Ubuntu
apt-get install mapr-ranger
- RHEL
yum install mapr-ranger
- SLES
zypper install mapr-ranger
Installing the Ranger Hive Plugin
You must install the Ranger Hive plugin only if you plan to restrict access to the HiveServer2 or Hive Metastore.
mapr-ranger-hive-plugin
:- Ubuntu
-
apt-get install mapr-ranger-hive-plugin
- RHEL
-
yum install mapr-ranger-hive-plugin
- SLES
-
zypper install mapr-ranger-hive-plugin
Installing the Ranger UserSync Service
The Ranger UserSync service is a helper service that obtains user information from Linux or LDAP and supplies the information to the Ranger Admin service. The Admin service leverages this information to create policies that apply to specific users of the platform.
You can choose to install the UserSync service on the same nodes where you install the
Ranger Admin service, or you can install the service on nodes where the
mapr-ranger
package is not installed.
Run the following commands as the cluster admin (typically the mapr
user):
- Ubuntu
apt-get install mapr-ranger-usersync
- RHEL
yum install mapr-ranger-usersync
- SLES
zypper install mapr-ranger-usersync
mapr-ranger-usersync
on a node where
mapr-ranger
is not installed, special configuration steps are required.
See Configuring Ranger.Removing a Ranger Package
sudo bash /opt/mapr/ranger/ranger-<version>/ranger-hive-plugin/disable-hive-plugin.sh
Post Installation Steps
To configure and start using Ranger, see Getting Started with Ranger.