Wherein we write down some stuff that we know.

Archive for the ‘HOWTO’ Category

Fedora EPEL and RHEL

Monday, May 11th, 2009

Using RedHat Enterprise Linux (RHEL) has many advantages, which nobody really cares about. What people want is a system where they can install the most common, yet “unsupported” packages. Fedora Extra Packages for Enterprise Linux (EPEL) does just this very thing.

If you’re using RHEL you probably work in an environment where you don’t have root and the sysadmin will not just let you install random stuff you compiled, assuming gcc is installed at all. Even if you do have an area to install something from source, you’re now stuck with maintaining it. Enter EPEL, a community effort to take Fedora packages and make them available for RHEL 4 and 5. The list of packages is quite impressive, including painful things like php-mssql (for connecting PHP to Microsoft SQLServer).

Apart from providing packages, what it really provides is a sustainable way for your sysadmin to install and maintain packages that RedHat Network doesn’t provide. The basic setup is that your sysadmin installs a configuration RPM, which drops in the yum repository file and the GPG key used to verify the packages, and then just use yum like they normally would.

So, no more installing git from source.

HOWTO: Fix Broken RHEL 4 and Perl LDAPS Connections

Thursday, September 18th, 2008

Are your LDAPS connections from perl scripts suddenly broken and you’re stuck staring at a screen with a seemingly useless error message?

is only avaliable [sic] with the XS version at /usr/lib/perl5/site_perl/5.8.5/IO/Socket/SSL.pm, line 30

I say seemingly because you know you didn’t change anything about IO::Socket::SSL. A few Google searches will at least fill in the blank before the is and tell you that LDAPS is unhappy.

If you are running RHEL 4, you probably had to install IO::Socket::SSL from CPAN. RedHat updated Perl 5.8.5 and some modules that required the XS (interface to use compiled C libraries in modules) version of Scalar::List::Utils. I’m not sure exactly what broke, but the easiest fix is to update IO::Socket::SSL from CPAN and it will update Scalar::List::Utils and all will be well.

HOWTO: Extracting postinstall Scripts from a RPM

Monday, July 16th, 2007

RPM packagers will often create shell scripts that help with the setup of the software that is going to be installed. If you want to look at what these scripts are going to do to your system run this command:

rpm -qp --scripts some-package.rpm > rpmscript.sh

Also handy in this context is seeing what files are in the package and where they will be installed.

rpm -qlp some-package.rpm

HOWTO Install Fedora Ruby on RHEL

Wednesday, January 3rd, 2007
  1. Uninstall any RHEL packages associated with ruby (ruby, ruby-rdoc, ruby-ri, etc. rpm -qa | grep ruby will give you the whole list)
  2. Install the ruby source rpm (rpm -i ruby-1.8.5-3.fc6.src.rpm)
  3. Install any dependencies except for libX11-devel (the previous install step should give you the names of all the devel packages you need)
  4. Install xorg-x11-devel (up2date xorg-x11-devel) to satisfy needed X11 files
  5. build ruby (rpmbuild -bb --nodeps /usr/src/redhat/SPECS/ruby.spec)
  6. Install ruby (rpm -ivh /usr/src/redhat/RPMS/i386/ruby*)

You may want to specify a build target in the rpmbuild step, although I’m not sure how much performance gain you would get, especially if all the glibc libraries are i386.

Upgrading PEAR on RHEL 4

Monday, November 27th, 2006

Problem: You need to install PEAR packages that use package.xml version 2.0 but you’re running the stock RedHat RPM of PHP which is at php-pear-4.3.9-22.i386.prm (aka pear 1.3.1).

pear upgrade Date
downloading Date-1.4.7.tgz ...
Starting to download Date-1.4.7.tgz (55,754 bytes)
.............done: 55,754 bytes
No handlers for package.xml version 2.0

You can’t upgrade PEAR using pear upgrade PEAR because you need at least pear-1.3.3 to get to the latest version.

requires package `PEAR' >= 1.3.3
PEAR: Dependencies failed

Solution:

  1. Download PEAR 1.3.3
  2. Install with pear upgrade /path/to/pear-1.3.3
  3. Upgrade PEAR with pear upgrade pear
  4. Optional: Upgrade your existing packages with pear upgrade-all

You may now install packages that use package.xml version 2.0. You are also ahead of the game with regard to RPMs. The next RHN update may hose what you have just done. You should probably consider marking php-pear as a package to ignore.

Update: As noted in the comments, you will need to upgrade to 1.4.11 before you can upgrade to 1.5.0.