MySQL (RSS)

MySQL fun!

Blog moved to WordPress and new domain...

I've moved my blog to my own domain and onto a WordPress engine, CS + SPAM was driving me nuts!

Catchup posts: Oh yes, I've been in Japan for a couple of months, first 2 weeks of photos are uploaded on Flickr, I still havent had a chance to upload the thousands after.

Whats more, I've actually written some information about me so you can finally find out my sad sad way of life. See About Thushan Fernando.

UBUNTU: Configuring Trac on Feisty fixing up the ClearSilver mess.

Last night i took a stab at installing Trac and failed. It was late (about 3am) and I needed sleep so I left it, today I've got it working but had to hop over a few hurdles to get there.

Firstly I'm trying to install the latest 'stable' version of Trac which is 0.10.4, this unfortunately requires the ClearSilver libraries which ho-hum is *not* included with Trac now. This means you have to build it from source and let me tell you that chances are (atleast on feisty) it wont work straight from the source files. So let me go through it for you:-)

Firstly we want to get ClearSilver installed and ready before we follow the TracInstall Guide and continue from there.

Building ClearSilver
Right lets get to work.
  • First thing we have to do is to get all the dependencies.
    $ sudo apt-get build-dep python-dev python-clearsilver
  • Then once thats retrieved, download the latest (as of writing 0.10.4) of ClearSilver:
    $ wget http://www.clearsilver.net/downloads/clearsilver-0.10.4.tar.gz
    $ tar xzvf clearsilver-0.10.4.tar.gz
  • Then we need to make two modifications to the configure and configure.in files. That is to add the correct version of python to the list of allowed python distro's. (v2.5). Easiest way to do this is to knock up Nano and find 'python_version=' (or goto line 6560 in configure and line 250 in configure.in. I'm too lazy so i used WhereIs (CTRL+W):
    $ nano configure
    $ nano configure.in
  • Now that we have modified the configure files lets configure and make it.
    $ ./configure --with-python=/usr/bin/python2.5
    $ make
    $ sudo make install
  • After a few minutes it should build and (for me it threw a few errors which I ignored) now its time to copy the shared file 'neo_cgi.so' to our python site packages:
    $ sudo cp -bi python/neo_cgi.so /usr/lib/python2.5/site-packages/neo_cgi.so
  • Almost there! Now its time to run the Python installation app for Trac and continue on with the TracInstall Guide:
    $ python ./setup.py install
This got Trac installed, however I got an error trying to access my SVN repo:
TracError: Unsupported version control system "svn". Check that the Python bindings for "svn" are correctly installed.
*doh* If you get a similar error simply install the Python bindings for SVN:
$ sudo apt-get install python-subversion
This will hopefully fix it!

Cool utility to mirror SVN Repo's!
If you have a remote SVN Repo you want Trac to make use of then there's no option (yet) to do that natively. However this is the open-source world and *someone* has already worked on addressing this need with the very cool app SVK. SVK can do much more than just mirroring repo's. Ubuntu users can find it in the Universe repo's as mentioned in the InstallingSVK wiki page.
$ sudo apt-get install svk
It installs alot of libraries but its funkyishly good. Then once its installed follow the guide on svk by running:
$ svk help intro
If you're planning on running a standalone server, dont forget to checkout the Wiki TracStandalone for configuration options, highly recommended you password protect it:-)

Is Trac. Is Good.

UBUNTU: Perfect Setup for home!

I cannot recall the last time I had two whole months off uni. Simply absurd when I think about it, ofcourse this is partly thanks to the Uni Project and having only 2 subjects to really commit to studying for during exam time with the added bonus of having the exams within a 2 week period. So whats a comp-sci guy to do to fill up this 2 month void? Go out and socialise? *pffft* yeah riiight...

Background
Previously I had Ubuntu Feisty running as an intermediate server 'just for play', allowing primarily for me to SSH in home and access the internal network to grab work etc (mapped network shares via Samba), sadly this took my excuse of 'Oooops i left it at home' away. This was all good, however our electricy bills at home keep climbing and the environment is hurting. With the amount of boxes I have at home (most with 600W PSUs) I knew I had to do something about it. So these holidays, it was time to crank open that tower and get the ball rolling on a brand new install of Feisty and replace the Windows 2003 server box that had served its purpose for so long as a Fileserver and webserver.

So here goes my adventure down Feisty Lane.

System Configuration
This is an old box I had that wasnt doing much, so I threw in all the bits I found lying around to build it.
  • GA-8IPE1000 Pro2
  • Pentium 4 3Ghz (HT)
  • 2GB RAM (DDR) [ had no idea we had so much ram going to waste! ]
  • SATA 250Gb Drive, this is where the main Feisty OS will be installed.
  • 8x500Gb SATA drives (WD5000YS RE2) some of these were in RAID-0 configs on the other machines
  • ATI Radeon 9600 AGP, the last surviving AGP 8x card. I have a 9700 All In Wonder and a GeForce Ti somewhere too.
  • Dual Gigabit cards (one on the motherboard, another as a PCI card), the whole house has been Gigabit'd.
I bought a new case too, at work we've been using the V1000+ from Lian-Li with some positive awe, so I went ahead and got the Lian-Li V1000+ Black (the Lian-Li V2000+ was also a contender because of the 12x3.5 bays but at the price advertised I figured not, plus I couldnt find a black one!!!). These cases look good and have very good airflow, they're also very light and have wheels to trolley them around. Unfortunately they accomdate for _only_ 6 hard drives, so I also bought four mobile racks to help. And yes if your wondering, the floppy drive bay was removed replaced with a mobile rack.

Here's the lspci output:
00:00.0 Host bridge: Intel Corporation 82865G/PE/P DRAM Controller/Host-Hub Interface (rev 02)
00:01.0 PCI bridge: Intel Corporation 82865G/PE/P PCI to AGP Controller (rev 02)
00:03.0 PCI bridge: Intel Corporation 82865G/PE/P PCI to CSA Bridge (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev c2)
00:1f.0 ISA bridge: Intel Corporation 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801EB (ICH5) SATA Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801EB/ER (ICH5/ICH5R) SMBus Controller (rev 02)
00:1f.5 Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)
01:00.0 VGA compatible controller: ATI Technologies Inc RV350 AR [Radeon 9600]
01:00.1 Display controller: ATI Technologies Inc RV350 AR [Radeon 9600] (Secondary)
02:01.0 Ethernet controller: Intel Corporation 82547EI Gigabit Ethernet Controller
03:01.0 RAID bus controller: Silicon Image, Inc. SiI 3114 [SATALink/SATARaid] Serial ATA Controller (rev 02)
03:02.0 RAID bus controller: Silicon Image, Inc. Adaptec AAR-1210SA SATA HostRAID Controller (rev 02)
03:03.0 Ethernet controller: D-Link System Inc DGE-530T Gigabit Ethernet Adapter (rev 11) (rev 11)
03:05.0 FireWire (IEEE 1394): Texas Instruments TSB43AB23 IEEE-1394a-2000 Controller (PHY/Link)

Roles and Responsibilities
Before you begin, its best to workout what exactly you want your box to do and the job to fufil.
  • File Server
    The primary role of this box is to replace other boxes and have a central storage, so plenty of hard drives and a 600W PSU from the older box was in order.

    As a file server its on 24x7 so additional roles include

    • Peer-to-Peering
    • Remote Administration Tasks
    • Anti-virus Scans across network shares.

  • WebServer = PHP, MySQL & Apache
    All our family affairs are stored electronically in our special little 'intranet' at home. From calendars to addressbooks (though this isnt as verbose as my mothers hand-written-over-the-years-almost-falling-apart Optus book) everythings stored in this beast of an application I created in PHP several yonks ago. So naturally this will need to be migrated.

  • Subversion Respositories
    All the stuff I do is knocked into SVN, so having a repo is also a must.

  • Folding@Home
    Why put a 3Ghz as a file-server when you have a 1Ghz P3 box as well collecting dust? So you can run folding on it when your not using it. The 1Ghz box will be a test bed for some BSD loving later.

    I started Folding@Home in November last year, and slowly I've climbed up the ranks (thanks partly to folding on ATI X19x0XTX hardware!)

  • Development Box
    As always I need a development box to throw DB stuff into, as well as learn some Ruby & Python sometime. I could do all this in windows but Linux seems to handle memory so much better and it seems a waste when there's 2Gb sitting on this box.

  • Workstation too!
    Yes thats right, I want to use this as a workstation too, so Ubuntu-Desktop is what I'm installing.
Thats all I could think of. I should probably mention now that I started this last weekend, as I work every weekday its the only time I have off to play with things.

Installing & First Few installs...
After installing I consulted the Ubuntu Feisty Guide to setup the first few bits.

Including:
So the next few posts will be based on what I do to the server box, things I find interesting and bits and bobs I install or muck up.

The server will be affectionately named ZEUS after our first Australian Customs Puppy who left us to work in November last year. Our special little guy is missed dearly.

PHP: PHP 5.1 Out!

Finally after almost a year and a wee bit more PHP 5.1 is out! Lots and lots of changes, recommended to Download, test and deploy

MySQL 5.0 Release Candidate (StoredProc, Updatable Views amongst the goodies!)

After 3 years (or so) of development MySQL v5.0 Release Candidate is out, this means we'll soon be getting the final... amongst the lovelies in this major bumb include:
  • Stored Procedures
  • Views (FINALLY!)
  • Triggers
Take a look at and the release candidate see what you think!

On a side note, google turned 7 today! Happy birthday you old fart, I dont know what we'd do without you!