Jump to: navigation, search

Netbean FTP remote project

From w3cyberlearnings

I installed Ubuntu Linux, Apache, MySQL, and PHP on my virtual machine which I run on VMware workstation. However, I do my development on Windows environment where I have installed the Netbean IDE. In this tutorial, I store all of my project source codes on the Virtual Machine which run on the Vmware workstation. I do not expect you to do the same, you may want to have store your project source codes on the remote server which using another Windows operating system or on the Hosting Server.

Contents

Netbean Installation

You require to download and install the Netbean on your development environment. Click the link to down netbean now http://netbeans.org/ NetbeanDownload

Remote FTP server

In order to remotely store and retrieve your project source codes, you need to have the FTP server installed on your remote server. I have already installed the FTP server on my virtual machine. Here is the command line I use to find out whether the FTP server has already installed.

sophal@sophal-desktop:~$ ps aux | grep vsftpd
root      5899  0.0  0.0   3640   940 ?        S    21:59   0:00 /usr/sbin/vsftpd
sophal    7520  0.0  0.0   3008   780 pts/0    R+   22:28   0:00 grep vsftpd
sophal@sophal-desktop:~$ 

Requirement For your project

Generally, you need to make sure all the configures are properly and correctly. It's up and running.

  • Setup and configure Apache Web Server: Run your web project
  • MySQL database: Store user data
  • PHP modules use for your project: Some PHP modules needed for your project
  • Folder and directory: Folder you store your project, and these folders must be read write permission (chmod 777 -R *)
  • User name and password: User name and password to access your FTP server or your remote server

Directory of my web project

I stored all my project source on this directory. Please change to your directory of your own.

sophal@sophal-desktop:~/project/phpBB3$ pwd
/home/sophal/project/phpBB3

IP address of my virtual machine

I using ifconfig to find out the IP address of my virtual host.

sophal@sophal-desktop:~/project/phpBB3$ ifconfig -a
eth4      Link encap:Ethernet  HWaddr 00:0c:29:a3:78:c8  
          inet addr:192.168.244.129  Bcast:192.168.244.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fea3:78c8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:689 errors:0 dropped:0 overruns:0 frame:0
          TX packets:743 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:55106 (53.8 KB)  TX bytes:58791 (57.4 KB)
          Interrupt:17 Base address:0x2000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:302 errors:0 dropped:0 overruns:0 frame:0
          TX packets:302 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:16492 (16.1 KB)  TX bytes:16492 (16.1 KB)

Apache Web Server Project Location

When I visit the htpp://192.168.244.129/phpbb3/index.php I will be able to see my project website. You need to configure your Apache Web Server to run y our web project.

http://192.168.244.129/phpbb3/index.php

What you need

  • IP address or DNS name of your project that setup to run your project: 192.168.244.129
  • Directory of your project source:/home/sophal/project/phpBB3

Create your project,upload and download source from remote server

Make sure you can access your remote server (FTP server) from your desktop or development environment.

Test Network Connection

I have successfully ping to my virtual machine, and my development environment and the virtual machine is talking to each other.

C:\Users\toyoma>ping 192.168.244.129

Pinging 192.168.244.129 with 32 bytes of data:
Reply from 192.168.244.129: bytes=32 time<1ms TTL=64
Reply from 192.168.244.129: bytes=32 time<1ms TTL=64
Reply from 192.168.244.129: bytes=32 time<1ms TTL=64
Reply from 192.168.244.129: bytes=32 time<1ms TTL=64

Ping statistics for 192.168.244.129:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

Test FTP from your development environment where you installed the Netbean

I ftp my remote server (virtual machine) to make sure the FTP server is up and running. If you can not access your remote server (virtual machine) through the FTP, you need to go back to the remote server (virtual machine) to reconfigure your FTP server.

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\toyoma>ftp 192.168.244.129
Connected to 192.168.244.129.
220 (vsFTPd 2.0.6)
User (192.168.244.129:(none)): sophal
331 Please specify the password.
Password:
230 Login successful.
ftp>

Configure and Setup the Netbean for your project

Now, it is time to setup your netbean for remote project.

Step 1

Okay, you create a PHP project.

  • File-->New project
  • Select PHP
  • On project Select PHP Application from Remote Server

FTP SERVER Netbean NEW PROJECt.png

Step 2

You do not need to do anything here, just provide the project name. The default location is fine.

  • You need to name your PHP project
  • You also need to set the path to store your project source

FTP SERVER Netbean Project Name.png

Step 3

  • on the Project URL you place the URL of your project. Here I placed htpp://192.168.244.129/phpbb3/index.php
  • click on the Manage, you provide the information from your remote server.
  • Provide the name
  • Here I setup using the IP address of my virtual machine: 192.168.244.129
  • User: sophal and password
  • the directory path to my project source: /home/sophal/project/phpBB3
  • You select Passive Mode to set it passive
  • Click on the Test Connection to test the connection

FTP SERVER Netbean NEW REMOTE FTP.png

Step 4

You do not to set the Upload Directory.
FTP SERVER Netbean NEW REMOTE FTP2.png

Step 5

  • Now, everything is fine. The Netbean will download your source code from your remote server. Wait until the download finished.

FTP SERVER Netbean NEW REMOTE FTP3.png

Set File Permission

When you upload file or folder to the remote server, you will have to set the file or folder permission manually. Netbean keeps the default permission.

sophal@sophal-desktop:~/project/phpBB3$chmod 777 -R *
Navigation
Web
SQL
MISC
References