yum -y install wget git gcc gcc-c++ make autoconf automake libtool sharutils asciidoc xmlto cmake unzip zip2、安装Java环境
下载地址:https://www.oracle.com/java/technologies/downloads/
解压安装
mkdir /usr/java tar -zxvf jdk-8u321-linux-x64.tar.gz -C /usr/java3、安装maven环境
下载地址:https://maven.apache.org/download.cgi
解压安装
mkdir /usr/local/maven tar -zxvf apache-maven-3.8.4-bin.tar.gz -C /usr/local/maven
settings.xml配置
MavenProxy
true
http
admin
admin
proxy_ip
proxy_port
maven.aliyun.com|mirrors.huaweicloud.com
nexus-aliyun
central
Nexus aliyun
http://maven.aliyun.com/nexus/content/groups/public
alimaven
central
aliyun maven
https://maven.aliyun.com/nexus/content/repositories/central/
huaweicloud
central
huawei cloud
https://mirrors.huaweicloud.com/repository/maven/
jboss-public-repository-group
central
JBoss Public Repository Group
https://repository.jboss.org/nexus/content/groups/public
4、配置环境变量
编辑/etc/profile
export JAVA_HOME=/usr/java/jdk1.8.0_321 export PATH=$PATH:$JAVA_HOME/bin export MAVEN_HOME=/usr/local/maven/apache-maven-3.8.4 export PATH=$MAVEN_HOME/bin:$PATH
使环境变量生效
source /etc/profile二、编译Ranger 1、下载ranger
git clone https://github.com/apache/ranger.git cd ranger git checkout remotes/origin/ranger-2.22、开始编译
mvn clean compile package install -DskipTests -Drat.skip=true3、编译完成 4、编译成果
cd /root/ranger/target



