drupal

Now Running on Amazon EC2

This blog is now running in the Amazon Elastic Compute Cloud (EC2). I hope that nobody notices any difference.

Setting Up Drupal 6 on Ubuntu 10.10 on EC2

For several years, I've been using pretty-cheap web hosting services for my blog, my corporate website, and other webby things. However, I'm pretty sure that it would be even cheaper to use Amazon EC2, especially as they now offer free usage for a year. I also like the ease with which one can scale EC2 servers up or down, and run temporary instances for a few cents per hour.

Of course, this means I have to figure out how to move everything from where it is to a new EC2 instance. Most of the stuff I care about is managed in Drupal, so step one is figuring out how to set up Drupal on an EC2 host.

I decided to go with Ubuntu as my OS, because I'm a long-time Debian user and my brushes with Ubuntu have been positive. A little research showed that they had an easy-to-install drupal6 package and a few other packages that I plan to use in my plans for world conquest.

But no matter how easy/straightforward things look, they are always a little bit complicated. Here are my notes for setting things up, which may be helpful to others, and will probably be helpful to me whenever I end up redoing this.

I assume the reader has basic knowledge of how to connect to servers via SSH, knows a little bit about setting up Apache and Drupal, and is comfortable using a text editor to modify configuration files.

Enabling FastCGI for PHP on Ubuntu

I'm setting up a virtual private server. If all goes well, I'll be moving all my websites from their current shared-hosting arrangements to this VPS.

I started with a minimal Ubuntu 8.10 image and installed all the LAMP stuff. Things went smoothly until I decided to try to enable FastCGI for Drupal. Googling for things like "ubuntu apache php fastcgi" results in zillions of links to suggested methods, all of which were very complicated and required digging through docs. I figured there had to be a simple way to do it.

After a few hours of research, I finally did stumble upon what I wanted. My problem was that I was googling for "ubuntu", when I should have been googling for "debian".

The info I needed was here: http://michiel.vanbaak.info/docsphp5fcgi.htm. Thank you, Michiel van Baak!

(To those of you saying "But you should really be using nginx instead of Apache," my response is "Yes, I know. Leave me alone.")

Drupal Rocks

I first dabbled in web development back in the mid 1990's. Back in those dark times, you created web sites by writing raw HTML, or by writing C or Perl CGI scripts. You spent about 1% of your time creating interesting content and behavior, and 99% of your time dinking with site layout, page layout, link updates, database administration, and other "plumbing" issues. I decided web development wasn't for me.

As years have passed, I've dabbled with some of the techologies that were supposed to make web development better: ASP, JSP, PHP, ASP.NET, Rails, Django, etc. While these eliminated some of the tedium of development, they also added a lot of complexity. Those technologies give you tools for building a web site, but they don't give you a web site. You still spent 1% of your time on creativity and 99% of your time on plumbing. A "real web site" still required a team of programmers, designers, and editors to create and maintain.

I've set up a few wikis. Those are nice in that they are easy to set up, and then the users can create content. Wikis are awesome for providing a collaborative publishing environment. The downside is that they all look ugly; you wouldn't want to use them for general-public web sites.

So, I've stuck with writing raw HTML for my personal web sites. This caused my sites to suffer, because writing raw HTML for an entire site sucks, especially if you want to provide navigation links, multi-column layout, headers and footers, and other niceties. My Capable Hands Technologies, Inc. web site kept its "Under Construction" home page for two years, because it just didn't seem to be worth the effort to put something there.

But then a few months ago, a friend told me he had set up a site using Drupal, and it was pretty cool. I finally tried it out a couple of weeks ago, and I am amazed.

All you do is unpack a tarball on a web site, create a MySQL database, fill in a few parameters (site name, logo, etc.), and bingo!, you have a real web site, with a nice layout, front page, navigation menus, articles, RSS feed, user accounts, multi-user blogs, forums, file uploads, and a zillion other things I haven't even looked at yet.

Drupal provides a great out-of-the-box experience, but there is a whole community providing additional modules (site features), themes (look-and-feel), and other stuff. So without writing any HTML or Perl, you can extensively customize your site with practically any feature you need.

The Drupal web site has a lot of documentation, but as with a lot of open-source projects, the documentation is not well organized, the tutorials are many-versions-old, and finding what you are looking for often takes forever. So I recommend that any new Drupal user read the book Using Drupal or something else like it.

The only downside to Drupal is that it is written in PHP, which is one of those programming languages which is wildly popular but which also sucks tremendously. But I understand that the Drupal codebase is one of the few examples of well-written, well-structured PHP, so I may tinker with the code a bit to learn some things.

Of course, Drupal is not the only "content management system" out there. WordPress or MovableType may meet your needs if you have a blog, or you may want something like Joomla or Zope instead of Drupal. The real lesson (for me) is that writing whole pages in HTML is something we don't need to do anymore.

Anyway, this old dog has learned some new tricks, and Undefined Value is now running on Drupal. As I learn more about Drupal, I'll be adding features. I apologize in advance for anything I screw up.

Syndicate content