Having posted 15 Minutes guide to Mediawiki a while back, I was looking for something simpler. I wanted to run an entire Apache MySQL PHP (AMP) in a sandbox. Something that is isolated from Vista on my laptop. So I thought I will setup Virtualbox.
Now, I’m sure almost everyone has heard of Virtualization. In case you have been living under a rock for past couple of years, Virtualization, in a nut shell is nothing but ability to run another Operating System within your existing OS.
So I decided upon Sun’s Virtualbox as the virtualization platform of choice. Now I need to find an OS to host the AMP (Apache, MySQL, PHP) stack. Linux was the OS of choice as it can run on a wide variety of hardware configuration. So I started hunting for a Linux Distribution with very low footprint, something that can run on, say 128 MB or 256MB of RAM and require very small hard disk. I just needed the essentials.
After, hours of googling, I came across this great “Appliance Linux” distribution known as turnKey. So what is turnkey? In a nutshell it is a pre-configured environment to perform a particular task. For example TurnKey LAMP will contain Apache , MySQL and Php along with a barebones Linux kernel built from the Ubuntu distro. The advantage of such a setup is that the whole thing needs just 128 MB of RAM.
So how do we go about it?
- Go to www.virtualbox.org and download their installer.(and Install, Duh!)
- Go to www.turnkeylinux.org and download LAMPP appliance (Direct link to the LAMP Appliance page).
- Once you are done with it, follow the err… following steps to bring up the Virtual Machine.
- Start the VirtualBox (DuH!!)
- Hit New, and give the options mentioned in the screenshot.
- Hit Next, and set the Memory to 256MB. This is the amount of RAM your Virtual Machine will have.
- Hit Next, and Click on ‘New Disk’
- Set the allocation to “Dynamic”. This means that the virtual Hard disk of the client will expand when necessary.
- In the next window, set the Storage HDD file location and Max Size (Recommended max size 2 – 4 GB).
- Now just Hit Finish in the last window and you should drop back to the main wizard.
- Hit finish on that too.
- Congratulations, You have created your first Virtual Machine (VM). Don’t pat yourself on your back yet. There are a few more steps ( Simple ones sweetheart, don’t fret 😉 ).
- Now we need to mount the Turnkey Linux’s ISO image file on the Virtual Machine. So next step will be to click on CD/DVD-ROM.
- Follow the instructions in the image below to Mount the ISO to the VM.
- Ok, now you are all set! Time to power on this baby… Err.. Wait, One more step. We need to setup Network for the VM, otherwise how will you be able to talk to your host machine? Follow the pictorial to set up network. Note: I assume that your system is a part of network and you have a DHCP server on your LAN.
- If you are not on a network, then you need to select “Internal Network” from the “Attached to” Dropdown.
- Click OK, and now are all set to go, Just hit the “Start (->)” button. You should see your brand new Virtual Machine boot up. It should boot from the CD-ROM.
- At this juncture, you are presented with 2 interesting choices. a). Boot from CD and b). Install to Hard Disk.
- Select “Install to Hard Disk” and then proceed with the installation. Make sure you select the entire HDD for installation. (Its the virtual Harddisk, so no, you wont lose anything from your REAL hard disk 😉 ).
- Once the installation is done, Turkey will reboot the VM and you should get straight to the configuration page.
If you need a static IP for your Turnkey, go to Advanced Menu -> Netowork -> Static IP.
- Once everything is done, You should be good to go. Try logging into the Turnkey by pointing to http://<ip of turnkey>:12321
- Login with password you had set earlier and you are good to go!
Have Fun 🙂 Should you need any help, feel free to comment, And I will try to help you out. 🙂