Summary:
This document details the steps involved in installing and configuring Apache Ranger.
These instructions are for installing Ranger on CentOS/RHEL (release 6).
Prerequisites:
JDK 7+ needs to be installed.
- MySQL (5.6+) or ORACLE DB (11g+) for Policy/Audit DB.
- DB server can be installed on the same host. Or Ranger services need to have access to DB server host
- Maven. If not installed, please follow below steps
wget http://mirrors.gigenet.com/apache/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz
su -c "tar -zxvf apache-maven-3.0.5-bin.tar.gz -C /opt/"
su -c "vi /etc/profile.d/maven.sh" # Add the following lines to maven.sh
export M2_HOME=/opt/apache-maven-3.0.5
export M2=$M2_HOME/bin
export PATH=$M2:$PATH
Now test your install of Maven. Logout of the system and then log back into it. Enter the following command:
- mvn -version
Building Ranger from source:
Get the ranger source
mkdir ~/dev
cd ~/dev
git clone -b master git@github.com:apache/incubator-ranger.git ranger
Now build the source
cd ranger
export MAVEN_OPTS="-Xmx512M"
yum search gcc and Install gcc (yum install gcc.x86_64)
mvn clean compile package assembly:assembly
Verify all the tar files under target dir
ls -ltr *tar.gz
-rw-r--r-- 1 root root 15068844 Dec 1 04:30 ranger-0.4.0-hdfs-plugin.tar.gz
-rw-r--r-- 1 root root 14480716 Dec 1 04:30 ranger-0.4.0-hive-plugin.tar.gz
-rw-r--r-- 1 root root 14349626 Dec 1 04:30 ranger-0.4.0-hbase-plugin.tar.gz
-rw-r--r-- 1 root root 17763192 Dec 1 04:30 ranger-0.4.0-knox-plugin.tar.gz
-rw-r--r-- 1 root root 21243470 Dec 1 04:31 ranger-0.4.0-storm-plugin.tar.gz
-rw-r--r-- 1 root root 126143540 Dec 1 04:31 ranger-0.4.0-admin.tar.gz
-rw-r--r-- 1 root root 7677999 Dec 1 04:31 ranger-0.4.0-usersync.tar.gz
Install/Configure Ranger Admin:
Lay down the binaries into appropriate places.
cd /usr/local
sudo tar zxf ~/dev/ranger/target/ranger-0.4.0-admin.tar.gz
- sudo ln -s ranger-0.4.0-admin ranger-admin
- Open install.properties in ranger root folder
- Verify the root password that you had picked while installing mysql. I had chosen root so the relevant section in my install.properties file looks as follows
- The install process would create a couple of users in the database for storing administration and audit information, pick passwords for those too. With my choices here’s how the relevant sections in the install.properties file look now.
- Ranger allows you to get different authentication modes but for now let’s just leave rest of the things in install.properties file as they are.
Once all the required properties are updated,
Execute : ./setup.sh
Execute : ./set_globals.sh
This will install the Ranger service.create a valid symlink in /usr/bin/ for start/stop of ranger admin
cd /usr/bin
ln -sf /usr/local/ranger-admin/ews/start-ranger-admin.sh ranger-admin-start
ln -sf /usr/local/ranger-admin/ews/stop-ranger-admin.sh ranger-admin-stopupdate ranger-admin service file to link to the start and stop scripts
vim /etc/init.d/ranger-admin ( Update the Start and Stop commands to point to the created symlinks )Start the Ranger Admin
service ranger-admin startYou can verify by visiting the external URL of the server using browser, for example :
http://<Host Address>:6080/
Install/Configure Ranger User Sync:
Instructions
Install/Configure Ranger HDFS Plugin:
Instructions
Install/Configure Ranger Hive Plugin:
Instructions
Install/Configure Ranger HBase Plugin:
Instructions
Install/Configure Ranger Knox Plugin:
Instructions
Install/Configure Ranger Storm Plugin:
Instructions will be updated soon.