Upgrading an OLD Gentoo Machine.

I’m in the process of re-installing a pretty old machine with the latest Gentoo. I’ve got a shared NFS directory with portage and all my machines are using a packages directory. After one machine builds something, another machine can simply install the built package.

Here is a portion of the make.conf on each machine.
FEATURES="-distlocks buildpkg"
PKGDIR="/usr/portage/packages/x86"

Well, this particular machine was installed with Glibc 2.3.x. I typed the following to do the upgrade:
emerge -auDvk system
About 1/3 of the way through the upgrade, tar suddenly stopped working:
tar: /lib/libc.so.6: version `GLIBC_2.4' not found (required by tar)
I realized that tar had been upgraded but the glibc was not yet upgraded. To fix the problem, I created a new version of tar on a different system:
USE="static" emerge -av tar # on another machine
scp :/bin/tar /bin/ # from the broken machine.

Off I go, things are working.

One way to unemerge lots of unneeded packages on Gentoo Linux

As part of a recent project, I had installed a lot of packages on a separate machine to test my configuration. As is common, with Gentoo, you want to run the following before you actually emerge anything:
emerge -p <package_name>
In this particular case, I noticed the dependency list was pretty long (50 packages to be exact). Instead of going ahead with the emerge, I first recorded the package list to a file for later reference:
emerge -p <package_name> --nospinner > dep.list
Now that I’m done with the project, I can clean up the packages I no longer need like this:
emerge -aC `cat dep.list | grep 'ebuild N' | cut -d ' ' -f 8`
Notice the grep. That is because a couple of the packages were simply upgraded and I don’t know that they aren’t needed. After a quick scan of the resulting list to see what is going to be uninstalled, I let emerge do the rest of the work.

Walla, no more 50 extra packages on that machine.

The Pix xlate command

I’ve recently had cause to change a couple static routings on our Pix 501 Firewall. I’ve done this in the past, but each time, it has resulted in a period of time where the new static mapping doesn’t take effect. Thanks to Jake on the PLUG Mailing list for pointing out to me the xlate command and usage here.

All you need to do is:
clear xlate

EDIT: Derek (same mailing list) suggests the following in order to only clear the one address, so that all the other existing customers are not interrupted.
clear xlate local <e.f.g.h>

Using Linux-HA for High Availability with Gentoo and Linux-VServer

In my production setup, I don’t have a load balancer. This may be changed at some point, assuming that we can find one we like for the price we want to purchase it for, but in the mean time, I’ve been inspired to set up a virtual IP address across two machines that each can load balance between my real servers. Inspiration for this project came from this article. I’ll be using Linux-HA to manage the virtual ip address with heartbeat.

Continue reading “Using Linux-HA for High Availability with Gentoo and Linux-VServer”