1) Build the source code
The first step is to download the source code, as well as the signature file and associated message digests (all available on the download page). Verify that the signature is valid and that the message digests match. Now extract and build the source, and copy the resulting admin archive to a location where you wish to install the UI:
- tar zxvf apache-ranger-incubating-0.6.0.tar.gz
- cd apache-ranger-incubating-0.6.0
- mvn clean package assembly:assembly
- tar zxvf target/ranger-0.6.0-admin.tar.gz
- mv ranger-0.6.0-admin ${rangerhome}
The Apache Ranger Admin UI requires a database to keep track of users/groups as well as policies for various big data projects that you are securing via Ranger. In addition, we will use the database for auditing as well. For the purposes of this tutorial, we will use MySQL. Install MySQL in $SQL_HOME and start MySQL via:
- sudo $SQL_HOME/bin/mysqld_safe --user=mysql
- CREATE USER 'admin'@'localhost' IDENTIFIED BY 'password';
- GRANT ALL PRIVILEGES ON * . * TO 'admin'@'localhost' WITH GRANT OPTION;
- CREATE USER 'ranger'@'localhost' IDENTIFIED BY 'password';
- CREATE USER 'rangerlogger'@'localhost' IDENTIFIED BY 'password';
- FLUSH PRIVILEGES;
3) Install the Apache Ranger Admin UI
You will need to install the Apache Ranger Admin UI using "sudo". If the root user does not have a JAVA_HOME property defined, then edit ${rangerhome}/setup.sh + add in, e.g.:
- export JAVA_HOME=/opt/jdk1.8.0_91
- Change SQL_CONNECTOR_JAR to point to the MySQL JDBC driver jar that you downloaded above.
- Set (db_root_user/db_root_password) to (admin/password)
- Set (db_user/db_password) to (ranger/password)
- Change "audit_store" from "solr" to "db"
- Set "audit_db_name" to "ranger_audit"
- Set (audit_db_user/audit_db_password) to (rangerlogger/password).
4) Starting the Apache Ranger admin service
After a successful installation, we can start the Apache Ranger admin service with "sudo ranger-admin start". Now open a browser and go to "http://localhost:6080/". Log on with "admin/admin" and you should be able to create authorization policies for a desired big data component.
No comments:
Post a Comment