'Help'에 해당하는 글 2건

eclipse+php 설정

서버관리 2012.12.27 15:24


jdk-* 최신 버전 받아서 설치한다. 위치는 디폴트.

Step 1: Download and Install Eclipse

Go to http://www.eclipse.org and download 'Eclipse Classic' (Don't download Eclipse PHP package), at the time of writing this Indigo (3.7) was the most current release.

Once downloaded, un tar ball/unzip and install Eclipse.

Next start up eclipse and choose your workspace folder.

Step 2: Settings up PHP PDT Plugin 

Alright once you have Eclipse up and running, your going to want to navigate to 'Help > Install New Software'. 

This will bring you to a screen like so 

If you look twords the top of that window you will see a drop down that says 'Wok With', click that and select '--All Available Sites--'.

Next you are going to want to search for 'PHP', this will list the same plugin in three different categories. Just select the first one that says 'PHP Development Tools (PDT)...' and then click 'Next' and run though the install process. Its is pretty straight forward. It will ask you to restart Eclipse click 'Restart Now'. Thats it you now have the PHP PDT plugin installed. This plugin by its self is not super useful because of the way the it is encased in Exlipses 'project' mentality.

From here on out when ever I say go and install new software, you should follow these steps.

Step 3: Install Remote System

You are going to follow the same instruction as above, but you are going to search for 'Remote System', remeber to select '--All Available Sites--' in the 'work with' drop down. Click 'Remote System Explorer End-User Runtime' and 'Remote System Explorer User Actions' and run through the install process like before.


추가로     PHP Development Tools (PDT) SDK Feature 선택하라. program languages 에 있다.

Step 4: Install Theme Switcher (Optional)

The setup for the theme switch is same as the above EXCEPT next to the 'work with' drop down you will see a 'add' button, click that. Fill out the form and enter this as the 'Location':


click ok, and in the list of available plugins to install you should only see one choice 'Eclipse Color Theme'. Check the box and run through the install process, it may give you a warning about installing software from outside sources, just click ok and continue.

Once Eclipse Theme is install you can navigate to Ecplise Preference, on mac they are in 'Eclipse > Preferences', on windows I think they are in 'File > Preferences'.

This will open a window with tons of options. All I want you to be aware of at this point is under 'General > Appearance > Color Theme'. This was added by the theme plugin. Here you can change your theme to what ever you prefer.


Step 5: Install Drupal plugin (Optional)

I work a lot with the content management system Drupal and thought it would be nice to note that there is an Drupal Eclipse Plugin.

To install the plugin it is going to be similar to the theme plugin above. Navigate to 'Help > Install New Software' and add a new site like above and enter the location as:


Again after adding this new location you will be prompted with only once choice. Just select 'Drupal for Eclipse' and run though the setup.


Step 6: Configuring PHP

By defualt in Eclipse 3.7 and greater php file will not automatically open in Eclipse. 

Go to 'Eclipse >Preferences' (Mac) or 'File > Preferences'(Windows) and then go to 'general > editors > file associations'. 

click the add button on the left and enter '*.php' with out the quotes. 









After you hit ok you will see a list of editors below. Click on 'PHP Editor' and then click the default button on the right. And then click ok.


Step 7: Configuring Remote System Explorer

First thing you need to do is add the Remote System Explorer perspective to your eclipse workspace.

Go to 'Window > Open Perspective > Other'. now look for Remote System Explorer and add that.

Now you will have a new tab in your Eclipse workspace. By defualt you can browse and edit local files on your hard drive with RSE.

Now the fun part setting up a new conennection.Clcik the little down arrow in the 'Remote System' tab and select 'New Connection'

The next screen shows you all diffecent types of connection. I am going to walk through setting up a ssh connection. So on the next screen select 'SSh Only' and select Next.

the next screen you will need to enter in your host. I am not going to show a picture of this step.

Now you have a new connection in your 'Remote System' tab if you unfold it you will see 'My home' and 'Root'. By default RSE gives you these two file filters to choose from.

If you want to add another filter you want to right click on 'Sftp Files' and go to 'New > Filter'.

Next you will enter in the file location you would like to start from, like /home/test. Select next, give the filter and name and click ok.

Step 8: Fixing PHP autocomplete with Remote System Explorer

The last step is fixing the php autocomplete feature. To do this you are going to have edit a hidden file in your workspace folder. But first we are going to enable hidden files on RSE. Go to 'Eclipse > Preferences' (Mac) or 'File > Preferences' (Windows) and then unfold 'Remote Systems > Files'.

Check 'Show Hidden Files' and click ok.

Now we are going to use RSE to edit an eclipse RSE .project file. So in your 'Remote System' tab open up your local files and navigate to you workspace folder. Look for a folder called 'RemoteSystemsTempFiles' and open that. Now you are going to edit the '.project' file. Open up that file.

You are going to add two line in between the <natures> tag, those lines are 

Save that file and restart eclipse. If you did everything correctly you should now have auto complete that will look like so
Well thats it, you should now have a fully fuction Eclipse web developing enviornment. Hope you enjoyed it, let me know if you find any errors in my work.



유용했던 자료를 기록해 두었습니다. 도움이 되시길~~~ Welcome! I started this blog as a way to give back to all of the other system administrators who have taught me something in the past. Writing these posts brings me a lot of enjoyment and I hope you fun

트랙백  1 , 댓글  0개가 달렸습니다.

실수로 압축을 하다가 -C 를 만들어 버렸다. 
그런데 삭제가 쉽지 않다.

15:56:13 # rm "-C"
rm: invalid option -- C
Try `rm ./-C' to remove the file `-C'.
Try `rm --help' for more information.

현재 경로를 지정해서 하니 잘 지워진다.

15:56:32 # rm "./-C"
rm: remove regular file `./-C'? y

유용했던 자료를 기록해 두었습니다. 도움이 되시길~~~ Welcome! I started this blog as a way to give back to all of the other system administrators who have taught me something in the past. Writing these posts brings me a lot of enjoyment and I hope you fun

트랙백  0 , 댓글  0개가 달렸습니다.