Compiling and installing OpenSRF 2.2 on Centos 5.9
We do quite a bit of work for King County Library systems. The library system has 45 branches and runs the Open Source Evergreen ILS. One of the very smart things that the Evergreen project decided was that their database of choice would be PostgreSQL. One of the things that the Evergreen project is not good at is supporting LTS releases of Linux and therefore certain things can be a chore. For example, by default OpenSRF 2.2 which is the current stable OpenSRF release can not be installed via RPM or compiled from source by default on CentOS 5.9.

When discussing with the community about CentOS, the response was the classic responses of, "just upgrade", "move to Fedora", "it isn't that hard to migrate to Debian" showing a clear misunderstanding of what it takes to support infrastructure on this scale. I digress.

So what to do next? Well, get your hands dirty of course.

Use yum to (make sure you have EPEL):
    * Install gcc44 gcc44-c++ libevent-devel httpd-devel

** Note: make sure you only have the 64bit versions installed. 
** Yum will sometimes install both i386 and x86_64.

Download compile and install: memcache 1.4.5

    * wget http://memcached.googlecode.com/files/memcached-1.4.15.tar.gz
    * CC=/usr/bin/gcc44 CXX=/usr/bin/g++44 
      ./configure --prefix=/usr/local/memcache/
    * make install

Download compile and install: libmemcache 1.0.7

** Note: 1.0.5 may also work as the requirement is libmemcache library version 0.8.0

    * wget \
      https://launchpad.net/libmemcached/1.0/1.0.7/+download/libmemcached-1.0.7.tar.gz
    * CC=/usr/bin/gcc44 CXX=/usr/bin/g++44 ./configure \
      --prefix=/usr/local/libmemcache/ \ 
      --with-memcached=/usr/local/memcache/bin/memcached
    * make install

Add the new libmemcache to ld.so.conf (or create a /etc/ld.so.conf.d file):
    * /usr/local/libmemcache/lib
    * ldconfig -vv|grep mem (you should see something like this:)
         libmemcached.so.3 -> libmemcached.so.3.0.0
         libmemcachedprotocol.so.0 -> libmemcachedprotocol.so.0.0.0
         libmemcachedutil.so.0 -> libmemcachedutil.so.0.0.0
/usr/local/libmemcache/lib:
         libmemcachedutil.so.2 -> libmemcachedutil.so.2.0.0
         libmemcached.so.10 -> libmemcached.so.10.0.0
         libmemcachedprotocol.so.0 -> libmemcachedprotocol.so.0.0.0
         libmemcached.so.2 -> libmemcached.so.2.0.0
         libmemcachedutil.so.0 -> libmemcachedutil.so.0.0.0
         libmemcached.so.2 -> libmemcached.so.2.0.0
         libmemcachedutil.so.0 -> libmemcachedutil.so.0.0.0

The .so.3 is a dependency from the installed RPM. This should not cause any 
problems as long as you see the /usr/local/libmemcache/lib line.

Download compile and install: opensrf 2.2.0
    * cd (where you unpacked opensrf)/src/extras
        * make -f Makefile.install fedora 
          # this will install any outstanding perl packages etc
    * cd (where you unpacked opensrf); CC=/usr/bin/gcc44  \
        CXX=/usr/bin/g++44 CFLAGS="-I/usr/local/libmemcache/include" \
        LDFLAGS="-L/usr/local/libmemcache/lib" \ 
        memcached_CFLAGS=/usr/local/libmemcache/include \
        memcached_LIBS=/usr/local/libmemcache/lib LIBS=-lmemcached \
        ./configure --prefix=/usr/local/openils --with-gnu-ld 
    * make install

cd /
ln -sf /usr/local/openils .
At some point I might turn this into some rpm packages but right now, we solved the problem.