How to install Apache Ranger 2.0.0 on a simple AWS Ec2 next to an ERM cluster?
Specifically I'm having trouble building Ranger from source (and I am not even sure if that is required!). My instance is an m5.xlarge of type Amazon Linux AMI 2018.03.0 (HVM), SSD Volume Type. This is the installation procedure I have taken so far, from a clean launched instance!
General update:
sudo yum -y update
Update Java
cd ~
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u141-b15/336fa29ff2bb4ef291e347e091f7f4a7/jdk-8u141-linux-x64.rpm
sudo yum install -y jdk-8u141-linux-x64.rpm
sudo yum -y remove java-1.7.0-openjdk
sudo su -c 'echo "export JAVA_HOME=/usr/java/default/"> /etc/profile.d/java_home.sh'
source /etc/profile.d/java_home.sh
Install Maven (https://www.javahelps.com/2017/10/install-apache-maven-on-linux.html):
cd /opt
sudo wget http://mirrors.gigenet.com/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
sudo tar -xvzf apache-maven-3.6.3-bin.tar.gz
sudo su -c 'echo "M2_HOME=/opt/apache-maven-3.6.3">> /etc/environment'
sudo su -c 'echo "PATH=/opt/apache-maven-3.6.3/bin:$PATH">> /etc/environment'
source /etc/environment
## update the environment
sudo update-alternatives --install "/usr/bin/mvn""mvn""/opt/apache-maven-3.6.3/bin/mvn" 0
sudo update-alternatives --set mvn /opt/apache-maven-3.6.3/bin/mvn
Check the version of Maven:
$ mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /opt/apache-maven-3.6.3
Java version: 1.8.0_141, vendor: Oracle Corporation, runtime: /usr/java/jdk1.8.0_141/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.14.138-89.102.amzn1.x86_64", arch: "amd64", family: "unix"
Install Ranger:
cd ~
wget https://www-us.apache.org/dist/ranger/2.0.0/apache-ranger-2.0.0.tar.gz
tar zxf apache-ranger-2.0.0.tar.gz
cd apache-ranger-2.0.0
sudo yum install -y gcc72.x86_64
# Build Ranger
mvn clean compile package install assembly:assembly
mvn eclipse:eclipse
Now, this really takes a while, eventually resulting in a failing "Hdfs Security Plugin". When I check for any tar file, as described in de GitHub repository, I cannot found any.
$ ls -ltr **tar.gz
ls: cannot access **tar.gz: No such file or directory
Result of mvn clean compile package install assembly:assembly
:
Result of mvn eclipse:eclipse
:
Further resources: