How to install eclipse in Linux (CentOS, RHEL, Fedora)

how to install eclipse in linux

Eclipse is an integrated development ennvironment primarily for Java but with the extra plugins it can also be used to develop applications in C, C++, PHP, Scala, etc.

Here we are explaining How to install eclipse on linux. Distros covered are Fedora, CentOS and RHEL.

Download Eclipse

Go to www.eclipse.org/downloads/ and select suitable version according to your needs.

Switch to root

 su - 

Extracting

We are extracting the Eclipse package into /opt directory.

 tar -xvzf eclipse-SDK-3.7.2-linux-gtk.tar.gz -C /opt 

Adding read permissions

 chmod -R +r /opt/eclipse 

Creating executable

touch /usr/bin/eclipse 
chmod 755 /usr/bin/eclipse 
gedit /usr/bin/eclipse

Paste following code in the file.

 #!/bin/sh
export ECLIPSE_HOME="/opt/eclipse" 
$ECLIPSE_HOME/eclipse $*

You are done!