Home  >  Article  >  Backend Development  >  Ubuntu 12.04 装配eclipse-php

Ubuntu 12.04 装配eclipse-php

WBOY
WBOYOriginal
2016-06-13 12:52:47917browse

Ubuntu 12.04 安装eclipse-php

1, 安装openjdk, Ubuntu 12.04默认jre为 openjdk-6-jre

??? sudo apt-get install default-jre

2,下载Zend Eclipse PDT , 下载链接: http://www.zend.com/en/community/pdt/downloads

3) 放到/opt文件夹里,并修改所有者为root和访问权限为可写,-R为所有的子项.

mv eclipse-php /opt/
sudo chown -R root:root /opt/eclipse-php
sudo chmod -R +r /opt/eclipse-php

4) 使用touch命令新建一个eclipse-php文件,使用nano编辑器编辑

sudo touch /usr/bin/eclipse-php
sudo chmod 755 /usr/bin/eclipse-php
sudo nano /usr/bin/eclipse-php

复制下面内容到eclipse-php文件

#!/bin/sh
#export MOZILLA_FIVE_HOME="/usr/lib/mozilla/"
export ECLIPSE_HOME="/opt/eclipse-php"

$ECLIPSE_HOME/eclipse-php $*

保存文件快捷键 (^O = Ctrl+o) ,和退出快捷键nano (^X = Ctrl+x)

5) 创建 gnome 菜单项

sudo nano /usr/share/applications/eclipse-php.desktop

复制下面内容到eclipse-php.desktop文件,Icon那项如果不存在可以去eclipse找到该图标复制到指定地址

[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse IDE
Exec=eclipse-php
Icon=/opt/eclipse-php/icon.xpm
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true

保存和退出 nano


6) 首次加载eclipse-php

/opt/eclipse-php/eclipse-php -clean &
7) 如果出现以下提示,请点击Ok忽略:
?
8)出现以下问题点No忽略。
?
?
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn