Install Eclipse PDT in Ubuntu Linux

Source: Internet
Author: User
Tags ftp transfer

In Ubuntu Linux for PHP development, You can first install the LAMP environment and phpmyadmin Mysql database management tool, and then select an FTP Transfer tool such as Filezilla. Finally, we need to select the PHP development tool, the built-in Gedit plain text editing in Ubuntu is sufficient for modifying the General Code text, but it is impossible to implement some functions such as project and debugging. Therefore, we 'd better select an IDE development environment, here we chose Eclipse (PDT ).



Eclipse initially contributed to the open-source community by the IDE development environment developed by IBM. It has many advantages, such as cross-platform, free open source code, and free IDE (integrated development environment. Initially, it was only used for java development. After adding Eclipse plug-ins, it can be applied to development of other languages such as C/C ++ (CDT), Perl, Ruby, Python, telnet, and database. The same is true for PHP. Install the PDT (PDT: PHP Development Tools) Plug-in Eclipse as a PHP Development tool. PDT supports both XDebug and Zend Debugger debugging tools.

Eclipse PDT download
If you have not installed Eclipse before, you do not need to install Eclipse before installing the PDT plug-in. The Eclipse official website directly provides All in one package and Download versions, including PDT 2.1-SR2, Eclipse 3.5-SR2, Mylyn, and other required plug-ins for PHP development. Go to the all in one pdt download page and select the appropriate Linux version, such as eclipse-php-galileo-SR2-linux-gtk.tar.gz download.

Eclipse PDT Installation Steps
1. Install the Eclipse Development Environment JDK/JRE

Eclipse runs on a Java Virtual Machine. Therefore, you must install the Java environment before you can perform development and testing. You can download JDK or JRE. JRE (Java Runtime Environment) is the Runtime Environment, JDK (Java Development Kit) is the Development Environment, and JDK Development Environment includes the JRE Runtime Environment. Therefore, if you only use Eclipse to develop PHP programs, JDK is not required, and JRE is required. If you also need to develop Java language, JDK is required.

After JDK is installed in Ubuntu, you no longer need to install JRE. For example, if JRE is installed, then JDK will be installed again. Open the Ubuntu terminal and run the following command:
Sudo apt-get install sun-java6-jre or sudo apt-get install sun-java6-jdk

Or use the Ubuntu New Software Package Manager, search for jdk find sun-java6-jdk, and select refresh-tag for upgrade-application. Install JDK.

2. Install Eclipse PDT

Decompress the downloaded Eclipse PDT package (All-In-One Linux x86/GTK 2 32-bit) to an appropriate directory, as long as the jdk/jre environment is set up, it does not matter where the Eclipse decompression folder is stored. Run the following command to decompress the terminal:

Sudo tar-zxvf '/home/farlee/download/eclipse-php-galileo-SR2-linux-gtk.tar.gz'

Decompress the package to the/home/farlee directory. After extracting the package from Eclipse, you can use the package without installation such as./configure # make install.

3. Add the Eclipse application icon

Add the Eclipse shortcut icon to the programming menu of the application in the upper left corner of the Ubuntu Desktop:
Sudo gedit/usr/share/applications/eclipse. desktop

Add the following code to the file opened by Gedit:

[Desktop Entry]
Encoding = UTF-8
Name = Eclipse
Comment = Eclipse IDE
Exec =/home/farlee/eclipse // change the directory path for installing the Eclipse executable file by yourself
Icon =/home/farlee/eclipse/icon. xpm // change it to your Eclipse Icon path.
Terminal = false
StartupNotify = true
Type = Application
Categories = Application; Development; // indicates the Application. Save and exit the program. Right-click the icon to add Eclipse to the desktop starter.

4. Set the workspace in Eclipse


Set the workspace Wrkspace as your www directory.



Finally, install an XDebug PHP debugging tool.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.