Archive for the ‘Redhat’ Category

PHP Extension Trouble

Thursday, October 16th, 2008

Just seen in the wild on an old-ish Fedora distro.

This works:

extension_dir  = /usr/.../php/extensions/no-debug-non-zts-20060613
extension = apc.so
extension = wbxml.so

Quick check shows good…

$ php -m
[PHP Modules]
apc
ctype

wbxml
xdebug
xml

But this does not:

extension = /usr/.../php/extensions/no-debug-non-zts-20060613/apc.so
extension = /usr/.../php/extensions/no-debug-non-zts-20060613/wbxml.so

And yet Zend modules seem to always require a complete path; eg:

zend_extension = /usr/.../php/extensions/no-debug-non-zts-20060613/xdebug.so

Kernel conflicts in really old versions of Fedora

Monday, October 13th, 2008

If you find yourself upgrading a wicked old Fedora distro, you may run across an error like this:

Error: Package initscripts needs kernel < 2.6.12, this is not available.

Try upgrading your kernel. To upgrade your kernel, make sure that only the latest version is hanging around. Because of a bug in legacy versions of yum, any older versions of the kernel must be removed.

To check your installed kernels, run:

$ rpm -qa | grep kernel

Note that if you simply run “rpm -q kernel”, you may miss smp kernels or other. The above will give you a complete picture. Remove all except the very latest version, then run yum update.

Redhat pfqueue Revisited

Saturday, January 5th, 2008

Finally got around to figuring out how to make pfqueue to run on Redhat. Though I never did get it to install and run from source, today I stumbled upon a copy in Dag Wieers repository. Simply install Dag’s build and, if you are using Postfix, make sure that the Posftix commands are in your path (I had to add /usr/sbin/to mine.)

Thank you Dag.

rpm freezes on Redhat 9

Thursday, November 15th, 2007

This kind of thing is exactly why I dislike Redhat. Probably such problems have been fixed on more recent distributions, however if you encounter a stubborn freeze, try killing the stale locks with rm -f /var/lib/rpm/__db*.

Apparently it will happen after prolonged usage or under heavy load. Or if you mutter nasty things about Bob Young.

Upgrading legacy Redhat 9

Wednesday, November 14th, 2007

I find myself stranded with another piece of shrike Redhat 9 server, somehow sold to an Indian client by Redhat India. (You’d think they would have the decency to say “by the way, there’s the project called Fedora..”) Anyway, I’m eventually going to try to bodysnatch it, but until then it desperately needs some package upgrades, and there’s no way I’m paying for RHN.

Here’s how to do Redhat 9 upgrades for free:

  1. Head over to the excellent RPM repository for legacy and recent Redhat/Fedora distributions maintained by Dag Wieers. He also has a tool called “rpmforge” which seems to help manage the packages (though I haven’t fully figured it out yet — maybe its just the config files for apt, up2date, yum, etc.) From RPMForge.net:
  2. The RPMforge.net project is an independent community-driven project to provide the infrastructure and tools to allow users, developers and packagers to meet and work together to provide and improve RPM packages.

  3. Check the FAQ for the appropriate RPMForge RPM. Install.
  4. Install the appropriate yum RPM. (Though I experimented with up2date, I could only get yum to work. apt-get is also probably okay..)
  5. Copy the yum configuration from /usr/share/doc/rpmforge-release-0.#.#/rpmforge.yum into /etc/yum.conf.
  6. Make sure that baseurl and mirrorlist are uncommented and correctly configured in yum.conf. (This bit threw me.. I have no experience with yum since going Gentoo.)

And that should do it. Running yum update from the command line will do a global system update for you. yum list updates will show you what’s available.

YoLinux has a delicious little yum tutorial, as well as a link to upgrading across releases if you want to enhance flavor and keep the hat on.

pfqueue

Friday, July 6th, 2007

I’ve been running a 空メール server for a number of years. As one might expect with a rule-based automated email reply system.. once in awhile the thing goes absolutely berserk. Usually I have to flop around the Internet trying to recover the commands I use (and promptly forget) to tame acid-tripping Postfix.

And generally this just boils down to postqueue -p to see what’s flying through and/or stuck in the queue and then postsuper -d ALL to clean it out.

Today, while tidying up, I came across pfqueue, a “console-based tool for handling MTA queues”. Looks great. Promptly tried it out and, surprise, surprise, while it emerges effortlessly on Gentoo, make install fails on my flavor of RedHat.

Need to figure this out. This tool could save me a ton of time.