05 Oct 2007


Building a blog from scratch, what was I thinking?

As I described elsewhere on this blog, the idea of setting a blog up and having control of the host is of geekly value, even if I’m not sure that I have the ability or time to generate much in the way of useful content. The process of getting this far is, however, pretty interesting. It’s also a little frustrating as there are lots more questions than easy answers.

The process began with a fairly simple need to update content on my webserver, an old PIII-550 that was running Fedora Core 4. Updates to Fedora have alway been painful with rpm dependencies getting out of hand, so the box was always out of date. A friend suggested ubuntu as an easy install with a nice small footprint and fairly good out-of-the-box security defaults. That let me to ubuntu 7.04 server, with a nice easy LAMP install option.

Well, not that easy, turned out that a bad stick of memory made the box too unstable to complete the install, but eventually it all came together. Here are the steps:

  1. The first hurdle, after the OS install and update/ugrades, was to configure apache with the virtual host settings that allow for the 3 sites that I host to all resolve properly.
    • copy the website data into the correct source folders
    • create the virtual hosting files sitevhostfile for each site in /etc/apache2/sites-available
    • enable each site in turn with the a2ensite sitevhostfile
    • reload apache /etc/init.d/apache2 reload
    • deal with any errors and warnings
    • test the sites by browsing to them
  2. Set up mysql. This seemed more difficult than it really was, mostly because the ubuntu server has no GUI and the mysql command line interface is pretty cryptic (at least to me!). Here is what I did:
    • Set up mysql database: mysqladmin -p -u root -h localhost pw
    • thought about editing /etc/my.cnf, but figured out that no bind-address setting was needed so just commented it out
    • restarted mysql: /etc/init.d/mysql restart
    • created a new database in mysql for each wordpress instance:

    mysql> CREATE DATABASE db_name;
    mysql> GRANT ALL ON db_name.* TO username @'ipaddress' IDENTIFIED BY 'password';

    • got too confused by the command line and installed mysql Administrator on my WinXP box then added one database per WordPress instance, an associated user per instance and granted all privileges to the user for their schemata. I barely understand what I just wrote!
  3. Set up WordPress. To be honest, Sean did this while I was sitting around wondering what just happened in step two. But this is what I think he did:
    • In the /usr/src/wordpress directory:
      • wget http://wordpress.org/latest.tar.gz
      • tar -xvzf latest.tar.gz
    • Change to the directory where the wordpress instance will be run (once for each virtual host root directory where a blog is desired and copy the wordpress files:
      • cp -r /usr/src/wordpress/* ./
    • make a wp-config.php file from the sample and edit the DB_NAME, DB_USER, and DB_PASSWORD to match what was configure in mysql in step 2
    • Browse to the wordpress instance wp-admin/install.php and follow the installation script steps

The basic site setup took about 2½ hours with a little advice from Sean helping out along the way. Now I just hope that I’ve captured enough detail here to help me through this process some day down the road when I end up needing to rebuild the server due to some unfounded need for more power.

1 Comment »

One Response to “Blog101”

  1. Sean on 06 Oct 2007 at 8:03 am #

    lol, the credit you give me may make someone think I’m an expert!

    We know the truth to that!


Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.