A development virtual machine can be really handy. It gives you a sandbox of sorts where you can feel free to test and experiment knowing that in a worst-case scenario you can just delete the VM and start over. It can also be a great way to practice server configurations and sketch out "real-world" server setups. Here's the process I follow to setup my Ubuntu 10.04 LTS Drupal development VM in VirtualBox. Aside from the VM-specific steps, these instructions should work for a regular Ubuntu server (VM or not).
This is a collection of notes I took while setting up a Drupal-ready Apache / MySQL / PHP environment on OS X using Homebrew and PEAR / PECL. I believe it should work to recreate an environment from scratch, but I've not run through the notes from start to finish on a fresh environment to validate. Hopefully this will help you get your own environment up and running easily!
Note: Mark Sonnabaum's Megalodon might be of interest to you, as well. For me, it involved learning a few too many things, and I also wanted as much as possible in my environment to be handled via a package manager like Homebrew or PEAR.
Update: Per Mark, Megalodon does entirely use Homebrew and Chef, I just misunderstood it. I look forward to seeing what I can do with it, once I dig in and understand it a bit more.
Update: Thanks, @stevepurkiss, for pointing out the typo on the first line for
brew tap... That's been fixed!
Update: Thanks, @cashwilliams, for pointing out some issues with the my.cnf and order of packages being installed. I've updated a couple of the instructions below to reflect his findings.
Update: I've added instructions for initial setup of Drupal coding standards for PHP Code Sniffer.
Now that I had a demonstrably working and functional web server going on my Linode (see Just got rolling with a VPS on Linode (Part 1)), it was time to get the rest of my toolkit on the box, setup users and secure the server a bit.
Installing Subversion and migrating repositories
Well, installing Subversion couldn't be any simpler:
apt-get install subversion
Login to old server and dump current repositories:
Note: A large part of this is taken from Victor Kane's article on Awebfactory about setting up Drupal on a fresh Linode, but I've documented some other things here and did some things a little differently than he did, so I figured it'd be worth writing up a post on the process. I've kept the details thin here in places where Victor's notes are more than satisfactory, but I've made sure to note where that happens.
Update: Be sure to check out part 2 of this article, as well.
I've spent the last several months of my off-work hours plugging away at helping the folks over at Gamers With Jobs get rolling with an upgraded version of Drupal, and in the process we decided to move from a shared hosting environment to a place where we've got a lot more control over performance and site configuration. In the meantime, Victor Kane's article on getting Drupal up and running on a Linode came across my RSS reader and provided the kick in the pants I needed to really investigate it. I looked at several VPS options, but in the end Linode seemed to be the best. They offered a seven day money back guarantee, which honestly isn't much, but it was long enough for me to feel comfortable giving it a shot without being out sixty bucks, so I decided to try it out.