Last active
August 29, 2015 14:27
-
-
Save patmandenver/0efd0b168901b6675b45 to your computer and use it in GitHub Desktop.
Install Oracle 7 on Ubuntu 14.04
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 | |
# | |
# Simple script to install Oracle Java 7 with auto accepting the license | |
# No need to interact with it | |
# | |
###################################### | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run with admin privileges 'sudo'" | |
echo "exiting...." | |
exit 1 | |
fi | |
echo "" | |
echo "Installing Oracle Java 7" | |
echo "oracle-java7-installer shared/accepted-oracle-license-v1-1 select true" | sudo /usr/bin/debconf-set-selections | |
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | sudo tee /etc/apt/sources.list.d/webupd8team-java.list | |
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | sudo tee -a /etc/apt/sources.list.d/webupd8team-java.list | |
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 | |
apt-get update | |
apt-get -y install oracle-java7-installer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment