The following is a step-by-step run through for installing Ubuntu 16.04 server as a virtual machine running under a Windows 10 host. Two prerequisites:
- Download and install Oracle VirtualBox on to your Windows 10 workstation.
- You will also need to download the Ubuntu Server 16.04 .iso file and place this file in a known spot on your hard drive.
Prepare the VirtualBox VM:
Click on “New” to create a new virtual machine: You’ll get this initial screen to choose the operating system you wish to install and choose a name for the your VM.
The next screen asks what you want to RAM memory. The recommended memory size is 768MB, but I’ve had decent luck by boosting this to 4 gigs, (on my 8 gig Windows 10 workstation.).
Accept the next suggestion to create a virtual hard disk. The default 8GB is fine, because VirtualBox will expand this if necessary.
Accept the default next screen, to choose the file type.
… and accept the default “dynamically allocated”
Finally you can choose the file size:
In this case, I chose 16 gigabytes.
Once you have completed the screens above, you need to change two other parameters before starting the actual installation:
Under Settings, change the networking connection to “bridged adapter”
Under storage, point the little CD image to your .iso file.
Install Ubuntu 16.04
At this point you are ready to start the VM, and go through installing Ubuntu from the .iso file. This is the standard Ubuntu installation from here on out… run from a console command line interface.
After making your keyboard and language selections, there are several prompts for additional information:
Choose a HostName: UBSandbox
Choose an initial account: larryk
Choose a login name for this account: larryk
Choose a password: mypassword
Encrypt your home directory? No
Set your time zone. Setup will suggest your local timezone and then ask
Is this time zone correct? Yes
Partitioning Method: Choose “Use Entire Disk”, don’t worry about LVN
Select Disk to partition…. choose the defaults.
Write changes to disk? Yes
At this point the files are copied to the disk, and the installation continues ore or less on its own for five minutes or so, then you’ll see a question about the use of an http proxy. This relates to the configuration for the package manager which is used to update the operating system. You can probably ignore this unless you know you are in a corporate environment that uses an http proxy server.
The next screen asks you about updating. I would answer this with the default “no automatic updates”. .
Finally there is a screen that allows you to select additional software packages to be installed. I would include the LAMP server, and the OpenSSH server. LAMP will be the usual Linux+Apache web server + PHP + mySQL
But wait! There’s more! You will be asked for a password for the mySQL database. Ignore this at your peril…and choose the same password as you used for your user account at the beginning of your installation.
At this point the installation will run for a few minutes and then …
Will this ever end? Accept the default ‘Yes” to install the GRUB boot loader.
And then…. we’re done.
At this point, you should have a working web server that is running an IP address on your network. To figure out that address. run ifconfig from the VM console. In our case we’re at 192.168.219.213
Looks promising. Now, we can open a web browser from our Windows workstation (or any other machine on the network, and we should see the Apache web server home screen.
We’re ready install WordPress. Before doing that however, you might create a snapshot* of the current state of the VM. This means we will always have a backup of the current machine that we can fall back to as we’re experimenting with installing things. If you haven’t already installed Ubuntu three or four times, you can always delete the whole VM and reinstall if you want to start from square 1.
*I know….this is for a future blog post.