Apache Ranger 1.1.0 Source import idea and run Debug Security-admin Web module

Source: Internet
Author: User
Tags ldap solr


What Apache Ranger is, it is a centralized management framework for the Hadoop platform that provides comprehensive data security access control and monitoring, Apache top-level projects. No nonsense, in fact this article is not so big on, is a step by step teach you how to import Ranger source to idea, and run debugging its Web module.

Import source
    • The first step of course is to download the source code, where the latest version of the 1.1.0
git clone https://github.com/apache/ranger.gitgit Checkout release-ranger-1.1.0
    • Compile, choose to compile all here, of course, you can choose a specific module to compile, time will be relatively long
MVN Clean Compile package install assembly:assembly
    • Add idea-related configurations and dependencies
MVN Idea:idea
    • Direct import on the line, what? You won't even import it.
Run the Debug Security-admin Web module

First initialize the database, it is recommended to choose Mysql,postgresql I initialize the time reported n many wrong, directly give up.

Change Security-admin/src/main/resources/conf.dist/ranger-admin-site.xml

Configure audit logs, no SOLR can be used without the control

    <property>        <name>ranger.audit.solr.urls</name>        <value>http://localhost:6083/ solr/ranger_audits</value>        <description></description>    </property>    < property>        <name>ranger.audit.source.type</name>        <value>solr</value>        <description></description>    

Configure Ranger database and user name password

    <property>        <name>ranger.jpa.jdbc.url</name>        <value>jdbc:log4jdbc:mysql:// localhost:3306/pranger3</value>        <description></description>    </property>    <property>        <name>ranger.jpa.jdbc.user</name>        <value>admin</value>        <description></description>    </property>    <property>        <name> ranger.jpa.jdbc.password</name>        <value>admin</value>        <description></ Description>    </property>
Configure Web. xml

There are two ways of doing this:

第一种Security-admin/src/main/resources/conf.dist set to resourcesDirectory

Modify Security-admin/src/main/webapp/web-inf/web.xml

  <context-param>    <param-name>contextConfigLocation</param-name>    <param-value> Meta-inf/applicationcontext.xml            Web-inf/classes/security-applicationcontext.xml            Meta-inf/scheduler-applicationcontext.xml</param-value >  </context-param>

Modify Security-admin/src/main/webapp/meta-inf/applicationcontext.xml

        <property name= "Locations" >            <list>                <!--<value>classpath:xa_default.properties</ Value>-                <!--<value>classpath:xa_system.properties</value>-                <!--< Value>classpath:xa_custom.properties</value>-                <!--<value>classpath:xa_ Ldap.properties</value>-                <value>classpath:core-site.xml</value>                <value> Classpath:ranger-admin-default-site.xml</value>                <value>classpath:ranger-admin-site.xml</ value>            </list>        </property>
The second type only changes the configuration file

Modify Security-admin/src/main/webapp/web-inf/web.xml

  <context-param>    <param-name>contextConfigLocation</param-name>    <param-value> Meta-inf/applicationcontext.xml            Web-inf/classes/conf.dist/security-applicationcontext.xml            meta-inf/scheduler-applicationcontext.xml</ param-value>  </context-param>

Modify Security-admin/src/main/webapp/meta-inf/applicationcontext.xml

        <property name= "Locations" >            <list>                <!--<value>classpath:xa_default.properties</ Value>-                <!--<value>classpath:xa_system.properties</value>-                <!--< Value>classpath:xa_custom.properties</value>-                <!--<value>classpath:xa_ Ldap.properties</value>-                <value>classpath:conf.dist/core-site.xml</value>                < Value>classpath:conf.dist/ranger-admin-default-site.xml</value>                <value>classpath:conf.dist/ ranger-admin-site.xml</value>            </list>        </property>

Add Tomcat

Then you can run the debug, enjoy the debug debugging it.

Apache Ranger 1.1.0 Source import idea and run Debug Security-admin Web module

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.