Monday, May 21, 2012

Often times, I work on several development projects at the same time, each of which requires different libraries, databases, servers, etc. Back in the "old days," I would spend hours getting my OS, IDE, and other development tools all set up exactly the way that I liked it for the project I was working on. Once it was over, I found it too tedious to undo all of those changes, so I left them while I added more configurations to my next project. After three or four projects, I started to run into conflicts, and eventually would get so frustrated that I wiped my hard drive and did a clean OS install. When it got to the point of doing a clean wipe once every month or two, I decided I needed a different solution.

I now use virtual machines to create separate, isolated environments for my various development projects. I have even created a simple base environment configured with the basic development essentials (ubuntu, jdk, eclipse IDE) that I clone each time I start a new project. I am going to walk through the steps I have taken to create this system. This method will work on any operating system.

What you will need:

VirtualBox - PC virtualization software. Supports most operating systems (Windows, OSX, many Linux distros)
Download and installation instructions are at
ISO for Ubuntu, or other OS. I will use Ubuntu because its free to download and use, and makes for a simple, easy to use development environment
For this walk through, I will set up a Web Development environment for developing PHP web applications.

Initial VM Install

  • Install VirtualBox. I am not going to give installation instructions, as the website has very clear instructions specific to your OS.
  • Open VirtualBox, select "New," and hit "Next" to begin the Create VM Wizard.
  • Name your VM. This is the base environment that I will clone for individual projects, so I am calling mine "Base Install."
  • Select the operation system and version and hit next. My selections would be "Linux"->"Ubuntu". "Next"
  • Select memory size. You will want at least 1 GB, but do not go over half of your total system memory. "Next"
  • Create a new virtual disk. Choose Dynamically Expanding Storage, and give it at least 10 GB.
  • After selecting your Virtual Disk, click Finish.
  • Select your new VM, and double-click "Storage."
  • Select the "Add CD/DVD Device" icon and point the wizard to the ISO for the OS you are setting up.
  • Now that everything is set up, Start your VM, and follow the instructions to get your OS installed.
  • Once the base install is complete, go ahead and install any software or tools that you expect would be common to all of your project setups. I installed the Sun Java6 JDK and Eclipse with the Subversion plugin.

Cloning a VM for a Project be continued...

No comments:

Post a Comment