My Computer

September 9th, 2005

I decided to cash in some Fry’s gift certificates and replace my main Windows machine. Here what I started with:

Old computer:
Shuttle SN41G2
AMD Athlon XP 2200+
512MB Corsair PC3200
AIT Radeon 9800 Pro
Seagate 120GB

New computer:
Crapy case from 1998
AMD 64 3000+
1GB PNY PC3200
AIT Radeon 9800 Pro (from old computer)
Seagate 160GB SATA

The construction of the new box was quite uneventful. Uneventful is exactly how you want a computer building project to be. I made only one trip to Fry’s, which is not even close to my record of five trips for a system I built some time back.

I am looking forward to playing with Windows XP 64, and Debian AMD64. Right now I am still in the process of transferring my files to the new machine.

Because I am using an old case (circa 1998) I had to add some extra airflow. Basically the case is a steel box. Since it had no case fans, a few small holes in the back provided all the heat dissipation for the enitre case. It originally housed a Pentium II which generated far less heat than an AMD 64 3000. So, I decided to add an 80mm case fan exhaust. My first idea was to cut a circular hole in the side panel, but this was shelved when I learned that it would cost me at least $30 for the tools.

I decided to use the resources I had on hand, basically a drill and some drill bits. I laid out the measurements of the case fan with a pencil. I drew a dot every place I wanted a hole. Then I took a tool which I think is called a “nail punch” (you could just use a nail) and dented each pencil marking. This allows the drill bit to stay where you want it when drilling rather than skidding across the metal surface. Now it was time to drill and drill and drill, I ended up with around 64 holes. To clean the holes up, I attached a “grinder” to the drill and smoothed the back side of the panel. Then all I did was attach the fan and put the side panel back on the case. For purely aesthetic reasons I added some blue LEDs which shine through the openings.

I hope you will see that doing case mods is not something to be left to the computer elite. I would recommend that you get some experience using an old case before ripping into you brand new Antec box.

DNS Utilities

September 7th, 2005

If you ever need to use dig, nslookup, or nsupdate, the Ubuntu package to install is dnsutils.

apt-get install dnsutils

After installation you should have access to:
usr/bin/dig
usr/bin/nslookup
usr/bin/nsupdate

nslookup is very nice for doing reverse URL lookups. By giving it a URL you can get back an IP address. Just go to the command line and type:

nslookup www.yourwebsite.com

nslookup www.slashdot.org
Server: 192.168.0.1
Address: 192.168.0.1#53
Non-authoritative answer:
Name: www.slashdot.org
Address: 66.35.250.151

Simple backups with rsnapshot

September 2nd, 2005

Anyone who administers computer systems should have a data backup solution. I came across a good article explaining how create an easy automated backup system. rsnapshot makes use of rsync and OpenSSH to make incremental and secure file transfers.

In the past I have made up my own backup scripts using rsync, but this might be a nice way to quickly protect your system from data loss.

Trac on Ubuntu

August 23rd, 2005

Since version control is something which every programmer should be using, and since I like Subversion (SVN), I thought it would be great to add a tutorial about installing a web based SVN interface. Trac allows you to browse your SVN repositories from any web browser.

This tutorial assumes you have already installed Apache2 and Subversion. Apache2 is simple to install, just use apt-get. Subversion is more complex to configure. Check out a tutorial I made about installing SVN. The directories don’t match this Trac tutorial, but the basic concept is the same.

The following Trac tutorial uses puts the SVN repository in a different place than my tutorial because I was following the standard SVN location. SVN repository locations are up to the user. You can put a repository anywhere (as long as you have sufficient privileges).

My Subversion tutorial SVN location: /usr/local/svn/project
Trac tutorial SVN location: /var/svn/project

I found a tutorial on the Trac website which focuses on a Debian install of Trac. But I ran into a problem, the Apache2 web server would fail to restart when I tried to follow the steps in the tutorial. All you have to do is make sure “libapache2-svn” is installed on your system prior to configuring Trac. If you don’t have libapache2-svn, get it with apt.

apt-get install libapache2-svn

Once you have done this prep-work, you should be able to follow the instructions below without encountering any error messages like “Invalid command ‘DAV’…” or “Cannot load /usr/lib/apache2/modules/mod_dav_svn.so into server…”

Much of the following is from Installing and Running Trac on Debian, with some important changes by me.

Install Trac
apt-get install trac

I decided to keep my Subversion project at /var/svn/project. Here are the commands I entered to get SVN up and running:
mkdir /var/svn
mkdir /var/svn/project
mkdir /tmp/project
mkdir /tmp/project/branches
mkdir /tmp/project/tags
mkdir /tmp/project/trunk

svnadmin create /var/svn/project
svn import /tmp/project file:///var/svn/project -m "initial import"
rm -rf /tmp/project

I added the following to /etc/apache2/sites-available/default
#SVN dir
<Location /svn>
DAV svn
SVNParentPath /var/svn
</Location>

Fix permissions and restart apache2
chown www-data /var/svn/project
chown -R www-data /var/svn/project/*
apache2 -k restart

If you get an error message from Apache2, read the following, otherwise skip:

I had some problems with the WebDAV module not loading. To enable this, you need to create some sym links inside /etc/apache2/mods-enabled. I typed this to get it to work:
ln -s /etc/apache2/mods-available/dav.load /etc/apache2/mods-enabled/dav.load
ln -s /etc/apache2/mods-available/dav_fs.load /etc/apache2/mods-enabled/dav_fs.load
apache2 -k restart

Ubuntu even comes with tools to manage these symlinks. Instead of the above you can also type this, which will have the same effect:
a2enmod dav
a2enmod dav_fs
/etc/init.d/apache2 force-reload

If you are having problems restarting and the error is something like “Unknown DAV provider: svn” try installing the libapache2-svn module by typing
apt-get install libapache2-svn
apache2 -k restart

I was able to test by going to http://servername.foo.com/svn/project where I could see the empty directories as imported. I did not move on to the next step until this worked right!

Configure Trac
mkdir /var/trac
trac-admin /var/trac/project initenv

The “trac-admin” command above prompted me to enter the project name, the path to the Trac environment, and the path to the Trac templates directory; then it printed out a bunch of stuff.

Adjust permissions
chown -R www-data /var/trac/project

Next, I edited /etc/apache2/sites-available/default and added this at the end:
Alias /trac "/usr/share/trac/htdocs"
ScriptAlias /proj /usr/share/trac/cgi-bin/trac.cgi
<Location "/proj">
SetEnv TRAC_ENV "/var/trac/project"
</Location>

Add basic user authentication for Trac
<Location "/proj/login">
AuthType Basic
AuthName "project"
AuthUserFile /var/www/trac.htpasswd
Require valid-user
</Location>

Now to add a couple of users
cd /var/www
htpasswd -c trac.htpasswd user1
htpasswd trac.htpasswd user2
chown www-data trac.htpasswd

Restart Apache2
apache2 -k restart

Customize your Trac install by editing /var/trac/project/conf/trac.ini
You can change the header logo, email notification, logging, and many other features

For further information about Trac, check out the TracGuide which is installed by default. You will find information about backup, using the Wiki, and many other useful topics.

ATI driver fun

August 19th, 2005

If you recently installed ATI’s Catalyst driver and are now presented with the following error message:

CLI.exe - Application Error
The application failed to initialize properly (0xc0000135). Click on OK to terminate the application.

How do you get rid of it? Well, the answer is simple…install the .NET framework from Microsoft. It would have been nice if ATI had mentioned the necessity for having .NET rather than just failing. The error message is totally useless, luckily the solution is very simple.