Thinkpad Rebirth

Selene, my trusty little IBM Thinkpad X22 died last wednesday. At first I thought it was Windows’ fault. It turned out later that it was the hard disk’s. I buy a new 40GB Seagate Momentus hard disk and what do I get? A catastrophic failure after just a few months’ use. Grrr. It’s a good thing I still have the original 20GB IBM Travelstar hard disk.

A hard disk failure is always a traumatic experience to me (and I’ve had quite a few). This is mainly because I don’t backup as diligently as others(?). I think about the gigabytes of data that can’t be recovered. Most of these is probably clutter and will probably be completely forgotten a few weeks later. But when you’re in the middle of the disaster you can’t help but feel this deep sense of loss :P But what has happened has happened and all you can really do is to pick up the pieces best you can and get things together and up again.

So I tried installing Linux Fedora Core 4. Wishing that this more robust operating system could save me from future grief. Although it was not Windows’ fault, I was thinking maybe it contributed >:) Besides, I’ve used Linux before. On my servers and, for one lengthy period, as a desktop OS. Unfortunately, things didn’t turn out the way I wanted them to. On my first attempt, a power management and hot-plugging wouldn’t work. I tried again with the same results. What’s a notebook without power management? I decided to give up on Linux (for the time being) and went back to Windows 2000.

After installing Windows 2000, I found out I didn’t have the drivers as the recovery partition was also trashed. Except one: for the Linksys WPC54G Wireless PCMCIA card. So I installed it and logged on to IBM/Lenovo to download the other drivers. I did a search and got a download link for a software installer which I promptly downloaded and ran. Lo and behold, it searched IBM/Lenovo for all the drivers and other software I need (and also those I don’t really need) and asked me which ones I want. I selected them all, started the download, and left it overnight. This morning the files were all waiting for me and with a click of a mouse button, they started installing. Pretty painless and quick. IBM/Lenovo rocks!

And thus my Thinkpad was reborn.

Tomcat 5 on Fedora Core 3

There are quite a few ways to go about this but one of the better (though not necessarily the easiest) is to use JPackage. On their website, it says that the JPackage Project has two primary goals:

  • To provide a coherent set of Java software packages for Linux, satisfying all quality requirements of other applications.
  • To establish an efficient and robust policy for Java software installation.

Now that is exactly what I’m looking for.

SETUP JPACKAGE
cd ~
wget http://jpackage.org/jpackage.asc
wget http://jpackage.org/jpackage.repo
su
rpm –import jpackage.asc
mv jpackage.repo /etc/yum.repos.d/
exit

SETUP RPM BUILDING
mkdir ~/rpms
cd ~/rpms
mkdir {tmp,build,rpms,sources,specs,srpms}

Put the following into .rpmmacros in your home directory:
%_topdir %(echo /home/jay/rpms)
%_tmppath %{_topdir}/tmp
%_builddir %{_topdir}/build
%_rpmdir %{_topdir}/rpms
%_sourcedir %{_topdir}/sources
%_specdir %{_topdir}/specs
%_srcrpmdir %{_topdir}/srpms

BUILD THE RPMS FOR REQUIRED NON-FREE PACKAGES JDK AND JTA
Get the JDK files from Sun: jdk-1_5_0_03-linux-i586.bin (not jdk-1_5_0_03-linux-i586-rpm.bin!)
cp jdk-1_5_0_03-linux-i586.bin ~/rpms/sources
Get the JDK source rpm from jpackage
rpm -Uvh java-1.5.0-sun-1.5.0.03-1jpp.nosrc.rpm
cd ~/rpms/specs
rpmbuild -ba java-1.5.0-sun.spec
Get the JTA files from Sun: jta-1_0_1B-classes.zip and jta-1_0_1B-doc.zip
cp jta-1_0_1B-classes.zip jta-1_0_1B-doc.zip ~/rpms/sources
Get the JTA source rpm from jpackage
rpm -Uvh jta-1.0.1-0.b.4jpp.nosrc.rpm
cd ~/rpms/specs
rpmbuild -ba jta.spec

INSTALL SOME DEPENDENCIES FOR JDK*
su
yum install xorg-x11-deprecated-libs
yum install xorg-x11-deprecated-libs-devel
yum install unixODBC
yum install unixODBC-devel
exit
*Theoretically not necessary if you use yum to install JDK

INSTALL JDK AND JTA
cd ~/rpms/rpms/i586
su
rpm -Uvh *
cd ~/rpms/rpms/noarch
rpm -Uvh *
exit

AND FINALLY INSTALL TOMCAT5
su
yum install tomcat5
yum install tomcat5-admin-webapps
yum install tomcat5-webapps
exit

Fedora Core 4 came out today though. Maybe all this hocus pocus is no longer needed.