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.

turn_1.png

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.

turn2.png

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.

turn_3-1.png

Adjust your memory if required.

turn_4.png

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

turn_5.png

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

turn_6.png

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

turn_7.png

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.

turn_8.png

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

turn_9.png

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.

turn_10.png

Next we'll set and confirm the MySQL password.

turn_11.png

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

turn_12.png

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

turn_13.png

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

turn_14.png

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 drupal.org LinkedIn App.net