How To Install Eclipse with PHP Development Tool on Ubuntu 7.10 Gutsy

Eclipse is a well known IDE interface which help programmers to develop their Java applications, but Eclipse is not only for Java programmers, as it can help PHP programmers as well by using the PHP Development Tools (PDT).

While searching on Internet I found several way to install Eclipse and PDT, so here I am going to tell you how I did it on my Ubuntu 7.10 Gutsy with PHP support. As I am a newbie on Eclipse I cannot tell you if it is the best way or that is error free. I only know that it worked for me, or at least Eclipse it started without any error message.

First you have to install the Sun Java Development Kit 5.0 (JDK) and Eclipse from Ubuntu repositories:

$ sudo apt-get update
$ sudo apt-get install sun-java5-jdk
$ sudo apt-get install eclipse

Now we have Eclipse installed and working, but there are a couple of problems, most important PDT is not installed as there's no debian package yet. Second this is an older version, Eclipse 3.2.2 instead of the 3.3.0. I used this approach to assure that everything Eclipse needs is installed.

To add PDT you can use an automated installation of PDT available via the Eclipse Update Manager, but as we want to use the latest version and also keep things simple, you can download the PDT All-in-One package.

Personally I downloaded the Stable Build S20070910-RC1 under the ~/tmp directory, you can choose the release that you prefer. There is no really installation program so these are the commands that I used to install it under my home directory and to start Eclipse.

$ mkdir ~/opt
$ cd ~/opt
$ mv ~/tmp/pdt-all-in-one-incubation-S20070910_RC1-linux-gtk.tar.gz .
$ tar xzvf pdt-all-in-one-incubation-S20070910_RC1-linux-gtk.tar.gz
$ cd eclipse
$./eclipse

Optionally you can change the Gnome Menu link using, System->Preferences->Main Menu application.

Now you can start working with Eclipse and PDT just create a new PHP file or project, and code away.

Danilo