Skip to content

Instantly share code, notes, and snippets.

@jdye64
Last active May 7, 2019 13:30
Show Gist options
  • Save jdye64/3774873d11d016bb74ea6ad9713cdb87 to your computer and use it in GitHub Desktop.
Save jdye64/3774873d11d016bb74ea6ad9713cdb87 to your computer and use it in GitHub Desktop.
sudo su && yum install -y wget
cd /opt
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz"
tar xzf jdk-8u131-linux-x64.tar.gz
cd /opt/jdk1.8.0_131/
alternatives --install /usr/bin/java java /opt/jdk1.8.0_131/bin/java 2
alternatives --config java
alternatives --install /usr/bin/jar jar /opt/jdk1.8.0_131/bin/jar 2
alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_131/bin/javac 2
alternatives --set jar /opt/jdk1.8.0_131/bin/jar
alternatives --set javac /opt/jdk1.8.0_131/bin/javac
# Check the version
java -version
# Install Maven 3.6.1
cd /opt && wget http://mirrors.sonic.net/apache/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz
tar xzf apache-maven-3.6.1-bin.tar.gz
cd /opt/apache-maven-3.6.1
# Install NodeJS which is needed to build NiFi
yum install -y epel-release && yum install -y nodejs && node --version
# Setup CentOS profiles
export PATH=/opt/apache-maven-3.6.1/bin:$PATH
export JAVA_HOME=/opt/jdk1.8.0_131/
# Set them up for future logins
echo "export PATH=/opt/apache-maven-3.6.1/bin:$PATH" >> /etc/profile.d/dev-setup.sh
echo "export JAVA_HOME=/opt/jdk1.8.0_131/" >> /etc/profile.d/dev-setup.sh
echo "NiFi Development environment setup complete"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment