[分享]Eclipse PHP Development Tools(PDT)安装手记

软件和网站开发以及相关技术探讨
回复
头像
moveon
帖子: 49
注册时间: 2008-05-13 22:34
来自: 青岛
送出感谢: 0
接收感谢: 0

[分享]Eclipse PHP Development Tools(PDT)安装手记

#1

帖子 moveon » 2008-06-30 9:50

原文来自我的博客:http://www.bargainspace.cn/post/117.html
----------------------------------------------------------------


在安装前先了解一下PDT的相关问题
From:http://wiki.eclipse.org/PDT/FAQ

PDT/FAQ
What is PDT?
The PDT is working towards providing a fully functional PHP Integrated Development Environment framework for the Eclipse platform. This project will encompass all development components necessary to develop PHP-based Web Applications and will facilitate extensibility. It will leverage the existing Eclipse WTP Project in providing developers with PHP capabilities. The main components in this project are: Editor (syntax highlighting, code assist and code folding), Inspection (file / project outline and PHP explorer view) and Debug (PHP script and web page methods).

How is PDT licensed?
PDT is licensed in accordance with the Eclipse Public License. Third party components built using PDT are made available under their own licenses

Does PDT include a debugger? Where can i find one?

PDT doesn't come with any bundled debugger but you can download Zend Debugger from Zend.com or XDebug from bugzilla.

See:

Installing the Zend Debugger
PDT: PHP Debugging w/ Zend
Getting Started with Eclipse PHP Development Tools (PDT)

How do I ask questions?
Questions about the use of PDT in user projects that are not addressed in this FAQ should be posted to the PDT newsgroup. Questions and comments regarding the implementation of PDT itself should be posted to the PDT mailing list.

How do I report a bug or request a feature?
PDT like all Eclipse projects, uses Bugzilla as its bug and feature tracking system. Entering a bug or a feature report is as simple as filling in a web form on the eclipse bugzilla page. The first time you enter a bug you will need to create a new bugzilla account for yourself by providing an email address and choosing a password. Before submitting a bug, please be sure to check the list of open PDT bugs and recentely closed PDT bugs.

Open PDT Bugs
Enter a new PDT Bug
How do I make a suggestion for this FAQ?
Sign up for a Bugzilla account, log in here, and contribute your FAQ questions and answers by clicking edit.

Installation
How do I install PDT?
See PDT/Installation.

How do I convert an existing project to use PDT?
See How do I manually assign a project Nature or BuildCommand?

Additional Resources
PDT User Guide
Eclipse Installation, Startup & Runtime
----------------------------------------------------------------------------------------------------------------------------------

可以从以下地址得到PDT:


http://www.zend.com/en/community/pdt

http://download.eclipse.org/tools/pdt/downloads/

安装JAVA运行环境JRE

http://java.sun.com/javase/downloads/index_jdk5.jsp



我选择的安装方式是pdt-all-in-one-S20080505_RC1-linux-gtk.tar.gz和jre-1_5_0_15-linux-i586.bin

首先安装JRE,不会的可按以下方式解压安装:

java运行环境安装方式:

http://java.sun.com/j2se/1.5.0/jre/inst ... extracting

然后把PDT-ALL-IN-ONE解压到目录(我解压到/opt,将得到一个eclipse文件夹)

在/usr/bin目录下创建一个启动脚本eclipse,执行下面的命令来创建:

代码: 全选

sudo vi /usr/bin/eclipse
如果不熟悉vi命令的可以用Ubuntu自带的简单文本编辑器gedit,用下面的命令来创建:

代码: 全选

sudo gedit /usr/bin/eclipse
然后在该文件中添加以下内容:

代码: 全选

#!/bin/sh 
export MOZILLA_FIVE_HOME="/usr/lib/mozilla/" 
export ECLIPSE_HOME="/opt/eclipse" 
$ECLIPSE_HOME/eclipse $* 
让修改该脚本的权限,让它变成可执行,执行下面的命令:

代码: 全选

sudo chmod +x /usr/bin/eclipse
在桌面或者启动面板上添加图标:
在桌面(右键单击桌面->创建启动器)或面板(右键单击面板->添加到面板 ->定制应用程序启动器)上创建一个新的启动器,然后添加下列数据:
名称:Eclipse Platform
命令:eclipse
图标: /opt/eclipse/icon.xpm

在Applications(应用程序)菜单上添加一个图标
用文本编辑器在/usr/share/applications目录里新建一个名为eclipse.desktop的启动器,如下面的命令:

代码: 全选

sudo vi /usr/share/applications/eclipse.desktop
或者

代码: 全选

sudo gedit /usr/share/applications/eclipse.desktop
然后在文件中添加下列内容:

代码: 全选

[Desktop Entry] 
Encoding=UTF-8 
Name=Eclipse Platform 
Comment=Eclipse IDE 
Exec=eclipse 
Icon=/opt/eclipse/icon.xpm 
Terminal=false 
StartupNotify=true
Type=Application 
Categories=Application;Development; 
保存文件。完成整个安装过程。可以双击桌面eclipse的图标来运行eclipse
安装完以后启动会选择工程项目保存文件夹,如果出现以下错误:

代码: 全选

Could not initialize the application's security component. The most likely cause is problems with files in your application's profile directory. Please check that this directory has no read/write restrictions and your hard disk is not full or close to full. It is recommended that you exit the application and fix the problem. If you continue to use this session, you might see incorrect application behaviour when accessing security features
则可创建~/.mozilla/eclipse文件夹,即:

代码: 全选

mkdir /home/username/.mozilla/eclipse
参考资料:https://bugs.launchpad.net/ubuntu/+sour ... bug/188380
自己活的只比鬼火亮那么一点点,却假装太阳去照亮别人!
回复

回到 “软件/网站开发”