vickya 2012-08-25
CentOS下面Eclipse步骤分享
2011-09-211:02
InstallEclipseSDK3.7(Indigo)onFedora15/14,CentOS/RHEL5.6/6
选自http://www.if-not-true-then-false.com/2010/linux-install-eclipse-on-fedora-centos-red-hat-rhel/
Thisisguide,howtoinstalllatestEclipseSDK3.7(Indigo)onFedora,CentOSandRedHat(RHEL).ThisguideshouldworkwithFedora15,Fedora14,Fedora13,Fedora12,CentOS5.6,RedHat(RHEL)5.6,RedHat(RHEL)6.Andevenwithearlierversions.
Eclipseisamulti-languagesoftwaredevelopmentenvironmentcomprisinganintegrateddevelopmentenvironment(IDE)andanextensibleplug-insystem.ItiswrittenprimarilyinJavaandcanbeusedtodevelopapplicationsinJavaand,bymeansofvariousplug-ins,otherlanguagesincludingC,C++,COBOL,Python,Perl,PHP,ScalaandRuby(includingRubyonRailsframework).
InstallEclipseSDK3.7(Indigo)onFedora,CentOS,RedHat(RHEL)
1.InstallSun/OracleJavaJDK6onFedora,CentOS,RedHat(RHEL)
2.DownloadEclipseSDK3.7(Indigo)
Downloadsuitableversionfromwww.eclipse.org/downloads.ThisguideusesEclipseClassic3.7version.AnotherpopularversionsareEclipseIDEforJavaEEDevelopers,EclipseIDEforJavaDevelopersandEclipseforPHPDevelopers.Selectalso32-bitor64-bitversiondependingonyoursystem.
3.Changerootuser
su-
##OR##
sudo-i
4.ExtractEclipsepackage(exampleto/optdirectory)
##x86-32-bit##
tar-xvzfeclipse-SDK-3.7-linux-gtk.tar.gz-C/opt
##x86_64-64-bit##
tar-xvzfeclipse-SDK-3.7-linux-gtk-x86_64.tar.gz-C/opt
5.Addreadpermissionstoallfiles
chmod-R+r/opt/eclipse
6.CreateEclipseexecutableon/usr/binpath
touch/usr/bin/eclipse
chmod755/usr/bin/eclipse
##Openeclipsefilewithyourfavouriteeditor##
nano-w/usr/bin/eclipse
##Pastefollowingcontenttofile##
#!/bin/sh
exportECLIPSE_HOME="/opt/eclipse"
$ECLIPSE_HOME/eclipse$*
7.CreateGnomedesktoplauncher
##Createfollowingfile,withourfavouriteeditor##
/usr/share/applications/eclipse.desktop
##Addfollowingcontenttofileandsave##
[DesktopEntry]
Encoding=UTF-8
Name=Eclipse
Comment=EclipseSDK3.7
Exec=eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true
8.StartEclipse3.7
Fromcommandlineuseeclipsecommand
eclipse
FromDesktopmenuGnome3Eclipse3.7
rightclick->createLauncher->
1,icon->eclipse.ipx
2,type->application
3,command->/usr/local/bin/eclipse
4,comment->eclipse
->ok,itwillcreateaquicklinkoftheapplicationonyoudesktop.