源码编译Apache Ranger

1、从官网下载源码包http://ranger.apache.org/download.html

本文选择apache-ranger-1.1.0.tar.gz的包;

2、 依赖的环境

2.1 Jdk8;

2.2 mven 3.5

2.3 git  

yum install git

2.4 gcc

yum install gcc 

2.5 MySQL

3、本文的环境

JDk8
[root@dmp9 apache-ranger-1.1.0]# java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

Maven 3.5
[root@dmp9 apache-ranger-1.1.0]# mvn -version
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-18T02:33:14+08:00)
Maven home: /usr/local/maven
Java version: 1.8.0_181, vendor: Oracle Corporation, runtime: /usr/java/jdk1.8.0_181/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-514.el7.x86_64", arch: "amd64", family: "unix"

HIVE 1.2.1

[root@dmp9 apache-ranger-1.1.0]# hive
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/dmp/hadoop-2.7.3/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/dmp/apache-hive-1.2.1-bin/auxlib/carbondata_2.10-0.1.0-SNAPSHOT-shade-hadoop2.6.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/dmp/hadoop-2.7.3/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/dmp/apache-hive-1.2.1-bin/auxlib/carbondata_2.10-0.1.0-SNAPSHOT-shade-hadoop2.6.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
WARN  28-09 17:50:41,868 - HiveConf of name hive.metastore.local does not exist

Logging initialized using configuration in jar:file:/home/dmp/apache-hive-1.2.1-bin/lib/hive-common-1.2.1.jar!/hive-log4j.properties

MYSQL  5.7.23 
[root@dmp3 dmp]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9011
Server version: 5.7.23 MySQL Community Server (GPL)

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

4、编译过程比较;

4.1、解压:tar -zxvf  apache-ranger-1.1.0.tar.gz

4.2、cd apache-ranger-1.1.0

4.3、设置maven的参数

export MAVEN_OPTS="-Xmx6144M"    参数小了编译容易GC Over limit;

4.4、maven 编译

mvn clean compile package assembly:assembly install

或者取消测试

mvn clean compile package assembly:assembly -Dmaven.test.skip=true install 

4.5、编译成功后具体如下,apache-ranger-1.1.0/target会生成好多插件包和ranger-1.1.0-admin.zip包;

[root@dmp9 target]# ls
antrun                            ranger-1.1.0-kafka-plugin.zip       ranger-1.1.0-sqoop-plugin.zip
archive-tmp                       ranger-1.1.0-kms.tar.gz             ranger-1.1.0-src.tar.gz
maven-shared-archive-resources    ranger-1.1.0-kms.zip                ranger-1.1.0-src.zip
ranger-1.1.0-admin.tar.gz         ranger-1.1.0-knox-plugin.tar.gz     ranger-1.1.0-storm-plugin.tar.gz
ranger-1.1.0-admin.zip            ranger-1.1.0-knox-plugin.zip        ranger-1.1.0-storm-plugin.zip
ranger-1.1.0-atlas-plugin.tar.gz  ranger-1.1.0-kylin-plugin.tar.gz    ranger-1.1.0-tagsync.tar.gz
ranger-1.1.0-atlas-plugin.zip     ranger-1.1.0-kylin-plugin.zip       ranger-1.1.0-tagsync.zip
ranger-1.1.0-hbase-plugin.tar.gz  ranger-1.1.0-migration-util.tar.gz  ranger-1.1.0-usersync.tar.gz
ranger-1.1.0-hbase-plugin.zip     ranger-1.1.0-migration-util.zip     ranger-1.1.0-usersync.zip
ranger-1.1.0-hdfs-plugin.tar.gz   ranger-1.1.0-ranger-tools.tar.gz    ranger-1.1.0-yarn-plugin.tar.gz
ranger-1.1.0-hdfs-plugin.zip      ranger-1.1.0-ranger-tools.zip       ranger-1.1.0-yarn-plugin.zip
ranger-1.1.0-hive-plugin.tar.gz   ranger-1.1.0-solr-plugin.tar.gz     rat.txt
ranger-1.1.0-hive-plugin.zip      ranger-1.1.0-solr-plugin.zip        version
ranger-1.1.0-kafka-plugin.tar.gz  ranger-1.1.0-sqoop-plugin.tar.gz

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值