In this tutorial, I'll explain how I set up Ubuntu Linux as a development server on a Debian host using Virtual Box.
Debian host specification:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
1) Install VirtualBox on Debian Host:
2) Install Windows on VirtualBox:
Launch VirtualBox, create a Virtual Server and install your operating system.
3) Accessing your Guest-OS from the Host:
By default, the Guest-OS on VirtualBox will use your Host-OS' NICs.
My host-OS has 2-NICs:
NIC#1 = configured for internet access
NIC#2 = manually configured with: address 192.168.150.30, netmask 255.255.255.0
Guest-OS network settings: (settings >> network >> network)
Adapter-1 = attached to NAT
Adapter-2 = attached to Bridged Adapter. Adapter-name(enp0s8)
IP-settings of Windows-Guest:
LAN#1: DHCP is enabled.....(obtain IP and DNS automatically)... to connect to NIC#1(above)
LAN#2: address 192.168.150.50, netmask 255.255.255.0 ... to connect to NIC#2(above)
thus, communication between Guest and Host is possible. I can ping back and forth
4) Install a WebServer. An ideal webserver should include: Linux / Windows, Apache, MySQL and PHP. Here are some webservers I have used and worked with:
- MAMP Server: Compatible with MAC or Windows
- SecureWAMP: a very lean webserver, it occupies little space and doesn't hog memory, etc. I prefer this actually.
- XAMPP - also a very nice web-server, but a little heavy on resources(just my opinion).
- EasyPHP: I have used this severally, really awesome.
- AMPSS: is a cross platform application. I discovered this just about a month back. Its Softaculous package makes AMPSS stand on a level by itself.
- UwAmp: another free WAMP Server
With a webserver installed on the Guest-OS, it can be accessed via http://<ip-address>:<port-number-where applicable>... on the Host-OS browser.
5) Set up shared directories between host and guest:
I prefer setting up Samba & Samba-client on my Linux Host, for accessing my Windows Guest. This gives me the ability to share my www(development root) directory with my Host.
First install samba server on your host: how to install Samba server. The share configured on the Host can be accessed from the guest via the Windows-guest OS.
Next, create a shared folder on the guest, and access it from the host with smbclient