Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wrote a little Java servlet and, in order to run it, acquired a VPS which runs Centos 5. Now, in order to run it, I guess the first thing to do is to install the latest JRE. I have ssh access and googled the web for tutorials on how to install Java through ssh, but most of them are very old, have broken links, or are very confusing.

Can anyone give a simple step by step instruction on how to install the latest JRE through ssh?

share|improve this question

You can install the OpenJDK right through the CentOS repositories, by running yum install java-1.6.0-openjdk as root. If you must have the SunOracle Java packages, visit the java download page and follow the links for downloading the JRE.

The advantage of using the OpenJDK is that you get updates automatically through CentOS. CentOS also has packages for Tomcat 5, if you were planning on using that.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.