My blog has moved! Redirecting…

You should be automatically redirected. If not, visit www.gangles.ca and update your bookmarks.

The Quixotic Engineer

Monday, January 28, 2008

My Latest Project

I came out of CUSEC last week filled to the brim with geeky creative energy and the desire to get my hands dirty with something new. While I usually have a few ongoing projects at any given time, my latest one, inspired by this fellow, has been use a nearly decade old unused computer to host a website. I'm curious to see how viably an old machine would work as a server for a low-traffic website, and how quickly it would load a Wordpress blog. While paying for a host is much more reliable and relatively inexpensive, I figured this would be a good chance to learn about Apache, PHP, Linux and the web in general.

My first step was to sort through the kipple that is my storage closet and find the old machine. Purchased in 1999, it has a 500 MHz Pentium III processor, 256 MB RAM and a 30 GB hard drive. I found a spot large enough to hook it up to the behemoth CRT monitor that's as deep as it is wide, and gave it a trial boot (I couldn't remember exactly why I had retired this old warhorse.) A corrupt Windows 98 sputtered at me, so I quickly went ahead and reformatted from a Linux CD.

I decided that Ubuntu Desktop edition would be my distro of choice for a number of reasons. While I would get better performance out of a server edition, as a Linux newbie I felt more comfortable having a GUI to fall back on when the mysteries of the command line eluded me. Secondly, one of my best friends recently moved her main computer over to Ubuntu, so hopefully she won't mind when I harass her with calls for help at all hours (thanks Malini!)

My next step was to install and configure Apache, PHP and MySQL, all necessary to set up Wordpress. While I've worked with Linux at school, this was my first time playing around with it. Needless to say I was pleasantly surprised when I managed to complete the installations with three commands:

sudo aptitude install apache2
sudo aptitude install php5 libapache2-mod-php5
sudo apt-get install mysql-server-5.0

I configured these programs with minimal difficulty, then moved on to the Wordpress installation. It's here, however, that I've run into a bit of a snag.

Step six in the Wordpress "Famous 5-Minute Install" is "Run the WordPress installation script by accessing wp-admin/install.php in your favorite web browser." The problem I'm having is that Firefox does not want to run PHP scripts. When I point my browser at install.php, it just asks me if I want to save the file to disk. This thread in the Ubuntu forums helped someone with a similar problem by suggesting that php5.conf might not be in /etc/apache2/mods-enabled/, but this is not the case on my machine. You can see my unanswered question sitting orphaned and alone at the bottom of the thread.

If you happen to be a Linux wizard (lizard?) and have a theory or two about how I can fix this frustrating problem, please drop me either a comment or an e-mail!

Labels: , ,

3 Comments:

  • I replied to your forum thread.

    but basically a symlink is a 'symbolic' link. Like a pointer to an existing file. Sort of like an alias. It transparently acts like the file being referred to, but if you remove the symlink the file referred to is still there.

    You need symlinks in the enabled directory to the files in the available directory.

    Working from the directory
    /etc/apache2/mods-enabled

    The following commands will create the required symbolic links:
    (I can't figure out how to mark code in blogger, but these commands should be all one line)

    sudo ln -s ../mods-available/php5.load php5.load

    and:

    sudo ln -s ../mods-available/php5.conf php5.conf



    Out of interest what version of ubuntu are you using? I'm using 7.10 and I just setup apache and php using synaptic to check this. The php scripts worked straight away (those symbolic links were created automatically).

    By Blogger Tim, At January 29, 2008 at 5:27 AM  

  • Use: ls -l
    to list in long form the directory contents. It will show you where the symbolic links point to so you can check it's correct.

    By Blogger Tim, At January 29, 2008 at 5:30 AM  

  • Thanks Tim, I'll try that out this weekend.

    By Blogger Matthew Gallant, At January 30, 2008 at 2:48 PM  

Post a Comment

Subscribe to Post Comments [Atom]



<< Home