Linux – How to install most recent version of Eclipse via the Terminal

eclipseoracle-linuxterminalyum

I'm new to Linux and have just been given a VM of Oracle Linux to work with. I need to install Eclipse on it and, after a bit of research, discovered that this could most easily be done with the following command in the Terminal:

sudo yum install eclipse

However, I noticed that this installed Eclipse 3.6.1 (Helios), rather than the more recent Eclipse 4.3.2 (Kepler). I realize that I can just go to the Eclipse website and download the most recent installation, but I'd like to know how to do this from the command line (as an educational experience, plus if I have to do this again I'd like a quick and simple way to do it). How can I install the most recent version, or any particular version, of Eclipse via the Terminal?

Best Answer

Distro repositories don't necessarily contain the latest version of something -- that depends on the distro policy.

Your best bet in this case, since it is drop dead simple, is to just install an Eclipse from the website. Doing this means you have to resolve any prerequisites yourself, but again it is pretty simple in this case: you just need a JRE (or, presuming you are using this for java programming, a JDK).

Beware that installing eclipse this way doesn't put the executable in $PATH, but it's inside the top level of the archive download. Unpack that where ever you want -- e.g., /opt/eclipse and:

ln -s /opt/eclipse/eclipse /usr/local/bin/eclipse

It can figure out where it actually is this way and use whatever other resources it needs from the archive. You could use $HOME/bin as the second path if you prefer there (presuming that's in $PATH). Don't use a path normally used by the distro installer, such as /bin or /usr/bin.

Related Question