Building Scribe from Silas Sewell’s source RPMs for CentOS / RHEL 5

Before, I wrote about how to build Scribe 2.1 and its’ dependencies on CentOS from source by hand.

I’m not a life long Linux admin, only been at it for a few years, so the process of discovery involved in getting it built made my hairline recede a bit…

The author just after running  ’make install’

However, you’re in luck if you want to avoid all that and keep your hair, if you’re willing to make a few compromises.

Silas Sewell was awesome enough to share his own source RPMS with the world!

Here are the limitations, though: It is uses slightly older versions of Scribe, Thrift and fb303 and thrift is build without support for java and some other languages. This is due to the unavaliability of some important packages in EPEL.

Outbrain is a java shop so normally it would be very important to builld thrift with java support, but we’ll be using Digg’s scribe-log4j-appender (which comes with its’ own thrift jar) that will write to a local scirbe instance’s buffer store on each application server then ultimately to a central scribe instance which works just fine with Silas’ RPMS.

The instructions below will build the redistributable binary RPMS you can use to deploy Scribe out to your CentOS boxen.

In theory you should be able to install all the dependencies (well not even all of them since we don’t need to the build or devel stuff) and then install the binary RPMs built from this process on any similar machine.

# Install all the dependencies:

yum -y install rpm-build gcc-c++ boost boost-devel libevent \
libevent-devel automake autoconf m4 bison zlib zlib-devel \
bzip2 bzip2-devel flex pkgconfig python-devel ruby-devel \
libtool mono-devel byacc ruby

# Get al the Source RPMS

wget http://silassewell.googlecode.com/files/thrift-0.0-0.el5.20090505svn770888.src.rpm
wget http://silassewell.googlecode.com/files/fb303-0.0-0.el5.20090505svn770888.src.rpm
wget http://silassewell.googlecode.com/files/scribe-2.01-2.el5.src.rpm

# Unpack/install all of the source RPMs

rpm -i thrift-0.0-0.el5.20090505svn770888.src.rpm
rpm -i fb303-0.0-0.el5.20090505svn770888.src.rpm
rpm -i scribe-2.01-2.el5.src.rpm

# Build and install thrift RPMs spec.

rpmbuild -bb /usr/src/redhat/SPECS/thrift.spec
rpm -Uvh /usr/src/redhat/RPMS/x86_64/thrift-0.0-0.20090505svn770888.x86_64.rpm
rpm -Uvh /usr/src/redhat/RPMS/x86_64/thrift-python-0.0-0.20090505svn770888.x86_64.rpm
rpm -Uvh /usr/src/redhat/RPMS/x86_64/thrift-cpp-0.0-0.20090505svn770888.x86_64.rpm
rpm -Uvh /usr/src/redhat/RPMS/x86_64/thrift-cpp-devel-0.0-0.20090505svn770888.x86_64.rpm

# Build and Install fb303 RPMs from spec.

rpmbuild -bb /usr/src/redhat/SPECS/fb303.spec
rpm -Uvh /usr/src/redhat/RPMS/x86_64/fb303-0.0-0.20090505svn770888.x86_64.rpm
rpm -Uvh /usr/src/redhat/RPMS/x86_64/fb303-devel-0.0-0.20090505svn770888.x86_64.rpm
rpm -Uvh /usr/src/redhat/RPMS/x86_64/fb303-python-0.0-0.20090505svn770888.x86_64.rpm

# Build and Install scribe RPMs from spec

rpmbuild -bb /usr/src/redhat/SPECS/scribe.spec
rpm -Uvh /usr/src/redhat/RPMS/x86_64/scribe-2.01-2.x86_64.rpm
rpm -Uvh /usr/src/redhat/RPMS/x86_64/scribe-python-2.01-2.x86_64.rpm

In the end you’ll have all of these files in /usr/src/redhat/RPMS/x86_64

fb303-0.0-0.20090505svn770888.x86_64.rpm
fb303-devel-0.0-0.20090505svn770888.x86_64.rpm
fb303-python-0.0-0.20090505svn770888.x86_64.rpm
scribe-2.01-2.x86_64.rpm
scribe-python-2.01-2.x86_64.rpm
thrift-0.0-0.20090505svn770888.x86_64.rpm
thrift-cpp-0.0-0.20090505svn770888.x86_64.rpm
thrift-cpp-devel-0.0-0.20090505svn770888.x86_64.rpm
thrift-perl-0.0-0.20090505svn770888.x86_64.rpm
thrift-python-0.0-0.20090505svn770888.x86_64.rpm
thrift-ruby-0.0-0.20090505svn770888.x86_64.rpm

I didn’t install them all because I didn’t need them all, but they’re there if you need them.

From there you just need to put them somewhere central (presumably an internal yum repository) and deploy them out.

NOTE: Siles’ RPMs put scribe into /usr/sbin/ where my previous article put everything in /usr/local/bin/.

Share