Do You Ubuntu?
No, I'm not one of those guys. The anti-switchers. The ones moving from OS X to Ubuntu for their primary desktop box. [Shudder] No siree; while those guys are admittedly SmartGuys (TM), I'm sticking around. There are still some SmartGuys that aren't leaving the party.
But I do have to admit that I haven't been completely faithful, either... While my Powerbook (fading G4 beauty and all) is still my primary deck, I've been using Ubuntu on my "other" desktop for the past 6 months or so. Business reasons, blah blah blah.
Knowing that I was going to be doing some traveling for customer demos and such, I popped for a dirt cheap little beater laptop. I picked it up for under $500 and promptly voided my warrantee by slapping Kubuntu on it. (Later I discovered that there is really no difference between this and a simple 'apt-get kde' on Ubuntu.)
And then today I stumbled across another system, again for under $500, that was destined to become my home server. The price-point was stupid cheap. The form factor is sexy, although not Mac Mini sexy. As a consolation prize, I got *way* more box for *way* less money than a Mac Mini. And I got a chance to drop Ubuntu Server on it.
Ubuntu server is exactly what I am looking for in a Linux distro -- a 6 minute install that leaves you with a base system, but NO SERVICES ENABLED. In under an hour (courtesy of "apt-get" and "gems"), I had a full Ruby on Rails server ready to rock and roll. What follows is the sum total of all of the steps I took to get Ubuntu Server 6.06.1 (Dapper Drake) turned into a Rails server.
First, the magic of apt-get:
- Edit "/etc/apt/sources.list", uncommenting the "universe" and "multiverse" entries.
- sudo apt-get update (to discover all of the new entries you just enabled)
- sudo apt-get install build-essential (gcc and the like)
- sudo apt-get install ssh (for the server; the ssh client is installed by default)
- sudo apt-get mysql-server
- sudo apt-get install ruby irb libtest-unit-ruby libyaml-ruby libzlib-ruby
I'm sure that I'll come to regret not building Ruby from source, but I just wanted to see if I could truly get a system up using nothing but apt-get and gems. I did, so there. [Sticks his tongue out]
Now, on to the magic of gems:
- mkdir gems; cd gems
- wget http://rubyforge.org/frs/download.php/11289/rubygems-0.9.0.tgz (yeah, not exactly intuitive to the casual observer)
- tar xvfz rubygems-0.9.0.tgz; cd rubygems-0.9.0
- ruby setup.rb
- sudo gem install rails --include-dependencies
At this point, the box is fully configured. I didn't time it to the second, but we're probably talking about 20 minutes. Yeah, there is still more work to do for Capistrano and Mongrel, but this is first and foremost a test/dev box, and it is perfectly ready to roll.
The last thing I like to do is run thru a quick Rails app, just to sanity check things. I've really grown fond of using http://developer.apple.com/tools/rubyonrails.html as my "canary in the coalmine". It touches on the most salient parts of Rails. It exercises the interop of the different pieces. (For example, on Ubuntu you need to edit "config/database.yml", adding "socket: /var/run/mysqld/mysqld.sock" under "development:" and "test:".) And I can blast through it in under 20 minutes, start to finish.
If you would've told me at the beginning of the year that I'd have $1,000 invested in non-Apple hardware, I would've laughed in your face. (Righteous indignation comes free with every Powerbook.) For all of the reasons that I love my Mac (hibernate when you close the case, plugging into any LCD projector on the face of the earth with complete confidence that I won't have to rebuild my kernel, etc.), Ubuntu won't become my desktop OS of choice anytime soon. But just the other day, I dropped a blank CD into my Ubuntu desktop and burned a disk on the very first try. It Just Worked. And that, my friend, is how you impress a Mac-weenie.
Posted on Fri, 25 Aug 2006 02:56 by default (683 day(s) old)
