Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. 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
  2. Open install.properties in ranger root folder
  3. 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 
    • db_root_user=root
    • db_root_password=root
    • db_host=localhost

  4. 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.
    • # DB UserId used for the XASecure schema
      #
    • db_name=ranger
    • db_user=rangeradmin
    • db_password=rangeradmin
    • # DB UserId for storing auditlog infromation
    • #
    • audit_db_name=ranger
    • audit_db_user=rangerlogger
    • audit_db_password=rangerlogger
  5. 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. 
  6. Once all the required properties are updated, execute the below scripts to install ranger admin service.

        Execute : ./setup.sh
        Execute : ./set_globals.sh

  7. 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-stop

  8. Update 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 )

  9. Start the Ranger Admin
         service ranger-admin start

  10. You can verify by visiting the external URL of the server using browser, for example :
        http://<Host Address>:6080/

  11. Logs are in ews/logs folder. The path is relative to where you have installed ranger-admin. Check xa_portal.log and catalina.out files for ERROR and WARN log messages

Install/Configure Ranger User Sync:

  1. Start by extracting out binaries at the appropriate place. 
        cd /usr/local
        sudo tar zxf ~/dev/ranger/target/ranger-0.4.0-usersync.tar.gz
        sudo ln -s ranger-0.4.0-usersync ranger-usersync
        sudo mkdir -p /var/log/ranger-usersync
        sudo chown ranger /var/log/ranger-usersync; sudo chgrp ranger /var/log/ranger-usersync
        cd ranger-usersync
  2. Now let’s edit the install.properties file. Here are the relevant lines that you should edit:
         POLICY_MGR_URL=http://localhost:6080
         SYNC_SOURCE=unix
         logdir=/var/log/ranger/usersync
  3. Now install the usersync by running the setup command
         export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64 ./setup.sh
  4. create a valid symlink in /usr/bin/ for start/stop of ranger usersync
         cd /usr/bin
         ln -sf /usr/local/ranger-usersync/start.sh ranger-usersync-start
         ln -sf /usr/local/ranger-admin/ews/stop.sh ranger-usersync-stop

  5. update ranger-usersync service file to link to the start and stop scripts 

         vim /etc/init.d/ranger-usersync ( Update the Start and Stop commands to point to the created symlinks )

  6. Start the Ranger Usersync
          service ranger-usersync start

  7. You can verify by looking at the users tab in Ranger Admin. Unix host users should be sync'ed to ranger.

  8. Logs are in logs folder. It is relative to the location where ranger-usersync was installed. Look for usersync.log file for User Sync related errors and auth.log for remote login errors.

Install/Configure Ranger HDFS Plugin:

...