Do I need to do this?The answer is most likely no. If you are content with your own personal system, you do not need external access to another. Even if you do use an external system, you do not need this so long as you can access it through a graphical interface, like Remote Desktop.
DescriptionA Php web project on a server can be accessed and used remotely from any client with NetBeans installed. The remote connection can be either via FTP or SFTP. The official NetBeans tutorial document is this:
Taz loginPersonalize this document by keying in your
SoftwareEven though the project is on a remote server, it is managed through a local copy, and so you still need the NetBeans Php plugin installation. If you don't already have it:
- Select Tools ⇾ Plugins from the menus
- Click the Available Plugins tab, scroll down and check Php. Then click the Install button.
- Windows: WinSCP (transfer), PuTTy (shell), or Cygwin shell ssh/scp command-line
- Mac: FileZilla, Fugu or Cyberduck (transfer), abd.or terminal shell ssh/scp command-line
Server key fileThe NetBeans remote SFTP connection needs a file in which to store the taz server key. If you're on a UNIX-like system, it is likely that the file NetBeans would like to use is already present:
~/.ssh/known_hostsOn Windows or other systems which do not have this file present, you will need to create file because NetBeans will not do so. For example, on Windows, create the empty file, say:
My Documents\known_hosts.txtThe name and location is unimportant. The only thing important is that the file exists.
Installation and ExecutionThe project, with at least one file, needs to exist on the server prior to installation. As a demonstration, we will use a the RemoteTest project. You will need to transfer this project into the public_html directory of your taz account.
- Download the source archive RemoteTest.zip. The folder RemoteTest contains, as a starter, the single file, index.php.
Somehow get the RemoteTest folder into the
~/public_html folder on taz, e.g.:
- Extract the archive locally and transfer the entire folder directly into public_html of your home directory on taz.
Transfer the RemoteTest.zip archive
to your taz home directory (one level above public_html).
Access taz via secure shell and extract the archive using unzip,
$ unzip RemoteTest.zip -d public_html/
- Open NetBeans and, within the Php category, create a
New ⇾ Php Application from Remote Server with
the following initial settings, then click Next.
Project Name: RemoteTest Sources Folder: PATH-TO/NetBeansProjects/RemoteTest PHP Version: (at least)
In the Remote Configuration window, a key step is to establish the
remote server connection. Click the Manage button. Fill in the
Create New Connection window, then click OK:
Connection Name: taz Connection Type: SFTPYou only need to do this server setup once for each server that you use.
Fill in the fields:
Host Name: taz.cs.wcupa.edu User Name: LOGIN Password: YOUR-TAZ-PASSWORD Private Key File: ignore this unless you know what you're doing Known Hosts File: if not filled in (on Windows), Browse to the "known hosts" file you created Initial Directory: /home/LOGIN/public_html
- Click the Test Connection button to confirm that all is OK. Then OK to leave this window.
Now back to the window which sets up the application itself.
Fill in, or confirm, these fields:
Project URL: http://taz.cs.wcupa.edu/~LOGIN/RemoteTest Remote Connection: taz Upload Directory: /RemoteTestYou should see this below the last field:
sftp://taz.cs.wcupa.edu/home/LOGIN/public_html/RemoteTestThen click Next to complete the setup.
- A Confirmation window presents you with a list of the files to download from the remote server. Click Finish to download the project files to your local system.
Synchronization with remote serverThe NetBeans Remote Project works best through a single dedicated client. However, you can make changes to the project in some other way, e.g., via secure shell to taz, and then synchronize the changes onto your dedicated client. By right-clicking on Source Files, you get a menu with these choices:
Download Upload SynchronizeThe last of these options, Synchronize, invokes a dialog whereby differences in the local and remote copies can be managed. You can verify its effectiveness by doing:
- Access taz via a secure shell client (e.g., PuTTy, Terminal Shell, etc)
Change to the ~/public_html/RemoteTest/ folder and
create ing a dummy file:
$ cd ~/public_html/RemoteTest/ $ echo "Created On Taz" > makeOnTaz.php
- Run Synchronize on the Source Files of the RemoteTest project.
- Click the Synchronize in the dialog presented.