Yes you can install linux, but don't expect to be able to run the latest and greatest with all the eye candy. If you can afford it, it would be worth it to upgrade the RAM. Just be sure to get exactly the recommended brand from somewhere like MemoryX. Compaqs notoriously only recognize half the RAM if you buy standard RAM.
You'll probably want to install something fairly lightweight. For older machines, I usually recommend either a bare bones Debian install (text only, then install X separately) or Damn Small Linux, which is built for older hardware. You can try out DSL as a live CD and then if you like it do a hard drive install (I've never tried this though). You might need the syslinux download for your old machine.
Here's some screenshots of Sarge
installation. If you want a 2.6 kernel instead of 2.4, type linux26
at the boot prompt (the first screenshot). You might also read this
, it's a bit outdated, but will help with the install anyway. Use aptitude
everywhere it says apt-get
(it's basically a newer program that does the same thing).
To maintain a lightweight system, you'll want to stay away from KDE or Gnome (which most distros use by default). Probably use something like fluxbox, windowmaker, or icewm instead. If you do want to use kde, in Debian you can do aptitude install kde-core
which will be slimmer than most KDE installs. If you want a graphical login, you'll need to install either xdm, kdm, or gdm. I believe xdm is the lightest of the three.
I have an old machine that is similar to yours and runs KDE just fine (although I do have 256MB RAM). Anyway, if you have more questions or want some help, I'd be happy to post a more detailed Debian installation...