8 min read

VirtualBox 3.1: Beginner’s Guide

Virtualization is a powerful tool that can make your PC duties easier, no matter if you’re a programmer, a systems administrator, a power user, or even a beginner.

Have you ever wanted to test the popular Joomla! Content Management System (CMS), but couldn’t spare the time and effort to install it in your PC, along with the Apache web server and the MySQL database server? Are you afraid to install Apache, MySQL and PHP in your only PC because it could mess things up?

Well, you can forget about all the hassle thanks to Oracle VirtualBox, a powerful virtualization software product that lets you create one or more virtual machines, or VMs, inside your physical PC. Each VM is completely isolated from your main PC and all the other VMs, so it’s like having several computers in one physical package, but you don’t need the extra space to accommodate all the additional LCDs and PC cases. Cool, huh?

In this article, I’m going to show you one of the quickest ways to set up a fully-functional web server right from your own home/office. And why would you need to do something like that? Well, if you want to create a website to establish your own presence on the Internet, there are some costs involved. First of all, you need to pay for a web hosting service and a domain name. So, if you want to learn how to create websites, this would be a perfect way to do it, since all the software we´ll use is free, and with the DynDNS dynamic DNS service, you don’t need to pay for a domain name because you can also use one for free. Furthermore, since you’re going to host your website on your virtual machine, you can also forget about the web hosting fee. Are these reasons good enough to start experimenting with virtual machines? I’m pretty sure they are!

I decided to use the Joomla! Content Management System (CMS) because it has all you need to establish your Internet presence. The TurnkeyLinux Joomla! virtual appliance includes everything you need to have a website running right out of the box, so you won’t have to go through the hassle of installing all the required web server software (Apache, MySQL, PHP, etc.). And in case something goes wrong, you can just wipe out your virtual machine and start again from scratch. How about that?

The first steps in the tutorial will tell you how to create a virtual machine (VM) with VirtualBox, how to get a preconfigured ISO image from the TurnkeyLinux website with all the necessary stuff to install the Apache web server, the MySQL database server and the Joomla! CMS in your VM.

Oh, and if you’re wondering how to make your web server available on the Internet, don’t worry: I’ll also show you how to get a free DynDNS account, and how to configure your Cable/DSL router to open port 80 (the HTTP web server port). That way, visitors from the Internet will be able to navigate in your brand-new Joomla! website.

You’ll need a PC or Mac system with Windows/Linux/Mac OS X installed, at least 1 GB of RAM and a Cable/DSL connection to the Internet, so you can configure your Cable/DSL router to let your virtual machine work as a full-fledged web server.

Getting Virtualbox

Download the most recent version of Oracle VirtualBox from the official website:

Once the download is completed, follow the instructions included in the User Manual to install VirtualBox in your specific operating system.

Downloading the Turnkey Joomla Appliance

You can download the Joomla appliance from the TurnkeyLinux website. Just click on the following link to start downloading it to your computer: http://www.turnkeylinux.org/download?file=turnkey-joomla-11.0-lucid-x86.iso.

Creating a new virtual machine

Open VirtualBox, click on New to open the New Virtual Machine Wizard and then click on Next. Type MyJoomlaVM in the Name field, select Linux as the Operating System and Ubuntu as the Version, and click on Next to continue:

Setting up a Joomla Web Server using Virtualbox, TurnkeyLinux and DynDNS

The Memory dialog will show up next. Select at least 384 MB (you can press the Left and Right arrow keys to increase/decrease the memory value) in the Base Memory Size slider (depending on the total memory available in your PC) and click Next to continue:

Setting up a Joomla Web Server using Virtualbox, TurnkeyLinux and DynDNS

Leave the default values in the Virtual Hard Disk window and click Next four times to finish configuring your virtual machine with the default values. Then click Finish twice in the Summary dialogs that will show up afterwards, and you’ll be taken back to the VirtualBox main screen. Your MyJoomlaVM virtual machine will appear in the virtual machine list, as shown below:

Setting up a Joomla Web Server using Virtualbox, TurnkeyLinux and DynDNS

Now we need to tweak some network settings so your virtual machine can behave as a real PC with its own IP address. Click the Settings button to open the MyJoomlaVM – Settings window, and then select the Network section:

Setting up a Joomla Web Server using Virtualbox, TurnkeyLinux and DynDNS

Make sure the Adapter 1 tab is selected; then click on the Attached to list box and select Bridged Adapter instead of NAT:

Setting up a Joomla Web Server using Virtualbox, TurnkeyLinux and DynDNS

Click on the OK button to close the MyJoomlaVM – Settings window and return to the VirtualBox main screen.

Installing the Joomla TurnkeyLinux appliance

To start your virtual machine, double-click on its name in the virtual machines’ list or select it and click on the Start button:

Setting up a Joomla Web Server using Virtualbox, TurnkeyLinux and DynDNS

The first time you open a virtual machine, the First Run Wizard dialog shows up. This wizard helps you to install an operating system to your virtual machine. Click Next to go to the Select Installation Media window, where you can select a media source to install an operating system in your virtual machine. In this case you’re going to select the Turnkey Joomla ISO live CD image you downloaded before. Click on the folder icon located at the right-side of the Media Source list box:

Setting up a Joomla Web Server using Virtualbox, TurnkeyLinux and DynDNS

The Choose a virtual CD/DVD disk file dialog will open up. Use this dialog to locate and select the Joomla Turnkey ISO image your previously downloaded; then click on Open to return to the Select Installation Media dialog and click Next to continue.

The Summary window will appear next, showing the media you selected. Click on Finish to exit the First Run Wizard and start your virtual machine.

Wait until the TurnkeyLinux boot screen shows up; then make sure the Install to hard disk option is highlighted and hit Enter to proceed (you can also wait until installation begins automatically):

Setting up a Joomla Web Server using Virtualbox, TurnkeyLinux and DynDNS

Wait until the Debian Installer Live screen appears. Use the keyboard to select the Guided – use the entire disk option and hit Enter to continue:

Setting up a Joomla Web Server using Virtualbox, TurnkeyLinux and DynDNS

The next screen will ask you if you want to write the changes to disk. Select Yes and hit Enter to continue.

The Debian Installer will start installing Ubuntu and the Joomla appliance in your virtual machine. After a while, a screen will appear asking if you want to install the GRUB boot loader to the master boot record. Select Yes and hit Enter to continue.

The next screen will tell you that the installation is complete, and will ask if you want to restart your computer (virtual machine). Make sure Yes is selected and hit Enter to continue.

Wait until your virtual machine boots up and asks you to type a new password for the root account. Type a secure password and hit Enter to continue. Type the password again and hit Enter to proceed.

Now the system will ask for the MySQL server ‘root’ account’s password. Type a password of your choice and hit Enter. Repeat the procedure to confirm the password.

Finally, the system will ask you to type a password for the Joomla ‘admin’ account. Choose a secure password, type it and hit Enter. Once again, repeat the procedure to confirm the password.

The next step is to write the email address for the Joomla ‘admin’ account. Type a real email address and hit Enter to proceed.

Next you’ll see a Link TKLBAM to the Turnkey Hub screen. In this case we’re not going to use the Turnkey Hub (a backup/restore system), so don’t type anything and hit Enter to continue.

The next screen that will show up is Security Updates. You can leave the default option (Install) and hit Enter to proceed.

(Be patient while the security updates get installed in your virtual machine; sometimes it can take several minutes.) Once the security updates finish installing in your virtual machine, the JOOMLA appliance services screen will pop up, and your virtual machine will be ready to roll:

Setting up a Joomla Web Server using Virtualbox, TurnkeyLinux and DynDNS

Write down the IP address assigned to your Joomla virtual machine (in the above picture it’s 192.168.1.79, but your IP address may vary). Then, open a web browser and type http://youripaddress (remember to replace youripaddress with the IP address you wrote down) to verify your Joomla virtual machine is working. The next screen should appear in your browser:

Setting up a Joomla Web Server using Virtualbox, TurnkeyLinux and DynDNS

Finally, you need to unmount the TurnkeyLinux Joomla ISO image from your machine’s virtual drive. This is to avoid booting up the ISO image again instead of booting up from your hard drive. Go to the Devices menu and select CD/DVD Devices > Remove disk from virtual drive:

That’s it for now. Now let’s see how to get a free domain name and configure your Cable/DSL router to accept incoming connections for your Joomla virtual machine.

LEAVE A REPLY

Please enter your comment!
Please enter your name here