Star
You must be signed in to star a gist
install jdk and maven for ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# jdk | |
sudo su root | |
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u73-b02/jdk-8u73-linux-x64.tar.gz | |
tar -zxf jdk-8u73-linux-x64.tar.gz -C /opt | |
update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_73/bin/java 100 | |
echo 'export JAVA_HOME=/opt/jdk1.8.0_73' >> /home/ubuntu/.bash_profile | |
rm jdk-8u73-linux-x64.tar.gz | |
# mvn | |
wget -N http://ftp-stud.hs-esslingen.de/pub/Mirrors/ftp.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz | |
tar -zxf apache-maven-3.3.9-bin.tar.gz -C /opt | |
printf "export M2_HOME=/opt/apache-maven-3.3.9\nexport PATH=\$PATH:\$M2_HOME/bin" >> /home/ubuntu/.bash_profile | |
rm apache-maven-3.3.9-bin.tar.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment