How To Install Java 7 in Linux


1. Login to the server you are going to update
2. Log up as root (sudo su -)
3. (If the server you are updating is one of our production web servers you will need to run the command below and then do item 6 below) route add -host 91.189.89.49 gw 10.222.128.2
4. You may need to run this command before the next command will work: apt-get install python-software-properties
5. Run this command: add-apt-repository ppa:webupd8team/java
6. If you had to run the command in step 3, run this command: route del -host 91.189.89.49 gw 10.222.128.2 (otherwise ignore this step.)
7. Run this command: apt-get update
8. Run this command: apt-get install oracle-java7-installer
9. Add the line below to the end of the /etc/bash.bashrc file.
export JAVA_HOME=/usr/lib/jvm/java-7-oracle