Wednesday 23 May 2012

Eclipse Installation Steps in CentOS5

# yum install eclipse-platform

Installed:
  eclipse-platform.i386 1:3.2.1-19.el5.centos

Dependency Installed:

  ant-antlr.i386 0:1.6.5-2jpp.2            ant-apache-bcel.i386 0:1.6.5-2jpp.2    ant-apache-log4j.i386 0:1.6.5-2jpp.2
  ant-apache-oro.i386 0:1.6.5-2jpp.2       ant-apache-regexp.i386 0:1.6.5-2jpp.2  ant-apache-resolver.i386 0:1.6.5-2jpp.2
  ant-commons-logging.i386 0:1.6.5-2jpp.2  ant-javamail.i386 0:1.6.5-2jpp.2       ant-jdepend.i386 0:1.6.5-2jpp.2
  ant-jsch.i386 0:1.6.5-2jpp.2             ant-junit.i386 0:1.6.5-2jpp.2          ant-nodeps.i386 0:1.6.5-2jpp.2
  ant-swing.i386 0:1.6.5-2jpp.2            ant-trax.i386 0:1.6.5-2jpp.2           classpathx-jaf.i386 0:1.0-9jpp.1
  eclipse-rcp.i386 1:3.2.1-19.el5.centos   jdepend.i386 0:2.6-6jpp.2              jsch.i386 0:0.1.28-1jpp.5
  junit.i386 0:3.8.2-3jpp.1                jzlib.i386 0:1.0.7-4jpp.1              libswt3-gtk2.i386 1:3.2.1-19.el5.centos

Complete!



++++++++++++++++++++++++++++++++++++++++++++++
howto install latest Eclipse SDK 3.7.2 (Indigo) on Fedora, CentOS and Red Hat (RHEL). This guide should work with Fedora 16/15/14/13/12, CentOS 6.2/6.1/6/5.8 and Red Hat (RHEL) 6.2/6.1/6/5.8 and even with earlier versions.
Eclipse is a multi-language software development environment comprising an integrated development environment (IDE) and an extensible plug-in system. It is written primarily in Java and can be used to develop applications in Java and, by means of various plug-ins, other languages including C, C++, COBOL, Python, Perl, PHP, Scala and Ruby (including Ruby on Rails framework).

Install Eclipse SDK 3.7.2 (Indigo) on Fedora, CentOS, Red Hat (RHEL)

1. Install Sun/Oracle Java JDK 7 or Java JDK 6

Install Sun/Oracle Java JDK 7 on Fedora, CentOS, Red Hat (RHEL)
Install Sun/Oracle Java JDK 6 on Fedora, CentOS, Red Hat (RHEL)

2. Download Eclipse SDK 3.7.2 (Indigo)

Download suitable version from www.eclipse.org/downloads. This guide uses Eclipse Classic 3.7.2 version. Another popular versions are Eclipse IDE for Java EE Developers, Eclipse IDE for Java Developers and Eclipse for PHP Developers. Select also 32-bit or 64-bit version depending on your system.

3. Change root user

su -
## OR ##
sudo -i

4. Extract Eclipse package (example to /opt directory)

## x86 - 32-bit ##
tar -xvzf eclipse-SDK-3.7.2-linux-gtk.tar.gz -C /opt
 
## x86_64 - 64-bit ##
tar -xvzf eclipse-SDK-3.7.2-linux-gtk-x86_64.tar.gz -C /opt

5. Add read permissions to all files

chmod -R +r /opt/eclipse

6. Create Eclipse executable on /usr/bin path

touch /usr/bin/eclipse
chmod 755 /usr/bin/eclipse
 
## Open eclipse file with your favourite editor ##
nano -w /usr/bin/eclipse
 
## Paste following content to file ##
#!/bin/sh
export ECLIPSE_HOME="/opt/eclipse"
 
$ECLIPSE_HOME/eclipse $*

7. Create Gnome desktop launcher

## Create following file, with our favourite editor ##
/usr/share/applications/eclipse.desktop
 
## Add following content to file and save ##
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse SDK 3.7.2
Exec=eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true

8. Start Eclipse 3.7.2

From command line use eclipse command
eclipse
From Desktop menu Gnome 3 Eclipse 3.7.2
Fedora 15 Applications Programming Eclipse
From Desktop menu Gnome 2 and Eclipse 3.6 (Helios)
Eclipse SDK 3.6.2 Launcher Gnome

9. Eclipse 3.6 screenshots, running (and starting) on Fedora 13 32-bit and CentOS 5.5 64-bit

Eclipse loading
Eclipse SDK 3.6 Loading on CentOS
Eclipse 3.6 running on Fedora 13 32-bit
Eclipse SDK 3.6 Running on Fedora 13
Eclipse 3.6 running on CentOS 5.5 64-bit
Eclipse SDK 3.6 Running on CentOS

Troubleshooting

If you get something like following errors:

Failed to load the JNI shared library /usr/java/jdk1.6.0_21/jre/bin/../lib/i386/client/libjvm.so
Or
/usr/java/jdk1.6.0_21/jre/bin/../lib/i386/client/libjvm.so: cannot enable executable stack as shared object requires: Permission denied
Then do following:
chcon -t execmem_exec_t '/opt/eclipse/eclipse'

No comments:

Post a Comment