Use TurnKey Linux with VirtualBox 4 on mac

I remember reading on some post online about developers using virtual environments as a development server. On my mac I use MAMP for development. But using a virtual environment allows you to create all sorts of servers (LAMP, Apache Solr, Varnish).

Over the weekend I spent some time looking at setting up my own virtual environment for development and found the TurnKey Linux site.

In this post I'll demonstrate how to setup the LAMP Stack Appliance with VirtualBox 4.

Get VirtualBox

First if you have not already download and install VirtualBox.


Download appliance

From the Turnkey Linux homepage select which appliance you want to download, in this example we'll use the LAMP Stack Appliance.

Download the virtual machine image.


Setup VirtualBox

Open VirtualBox and click on the New icon, then Continue on the first wizard page.

On the VM Name and OS Type page, enter in a name and select operating system as Linux and version as Ubuntu.


Adjust your memory if required.


Once you get the Virtual Hard Disk section. Select the Use existing hard disk option and click on the open icon.


Extract the virtual machine disk that you downloaded from Turnkey Linux on your computer. Navigate to the folder and select the .vmdk file.


Once you have finished the wizard you'll see your virtual instance in VirtualBox.


Configure virtual environment

Before we turn on the instance their are a few things we have to configure in the settings section.

Click on the settings icon and go to System > Processor and tick the Enable PAE/NX checkbox.


Still in the settings section go to Network > Adapter 1. From the Attached to box select Bridged Adapter.


Configure Turnkey Linux appliance

Now we are ready to start up our virtual instance. Before we can do anything TurnKey Linux will ask us to configure a few things.

First we'll set and confirm the root password.


Next we'll set and confirm the MySQL password.


If you want TurnKey Linux Backup and Migration set enter in the API key or hit Skip.


In the next screen you'll be asked if you want to install security updates. You can perform security updates later at anytime.


Once you get to the appliance services screen your ready to go.


If you have any problems or questions please leave a comment.

More infomation:

Ivan is the founder of Web Wash and spends most of his time consulting and writing about Drupal. He's been working with Drupal for 6 years and has successfully completed several large Drupal projects in Australia.

Connect: Twitter LinkedIn