Chris Maynard wrote this great tutorial on installing Java on MT. I wanted to share my notes on the process.
Steps from Maynard’s Tutorial
1. Check your CentOS release (this is the command:cat /etc/redhat-release)
2. Get Java (http://developers.sun.com/downloads/)
Notes: Maynard advises you to use the wget command. This is obviously ideal, but if you can’t get the link to work (I had authentication issues on the Sun side), don’t forget that you can do it the slow way and upload the .bin file to your root directory by using the same logins you use for SSH in an FTP program (ex. Filezilla). And if you’re curious on what Java file to get, get the Linux version (ergo, the one that ends in .bin)
2a. Alter the permissions (command: chmod 777 java.bin) If you uploaded via FTP, use your program’s edit method (right click+File Permissions in Filezilla)
3. Execute the bin file (command: ./file.bin)
Notes: If you had to use the FTP method, make sure you renamed the file, or else run ./java-long-file-name to get the correct result.
4. Tell your server what’s up (command: /usr/sbin/alternatives ––install /usr/bin/java java /usr/java/jdk1.6.0_04/bin/java 1
Notes: if you are in the /root folder, you may need to go up a directory for this to work .. cd ../ to get to the / directory. Also don’t forget to change the version number. In this case, the segment jdk1.6.0_04. The 04 is the update number, so, for example, update 22 will be jdk1.6.0_22. Also, that –install command is two dashes, in case that’s unclear.
5. Make sure it’s working (command: java -version)