syslog-ng on Solaris
I have played with Solaris a few times in the past, but it always ended up in disappointment, after long and cruel battles with trying to get things into shape. Compiling and running syslog-ng on this platform proved to be quite a challenge.
Today I gave it another try, and found the OpenCSW project, and figured I’ll try getting things up and running with the help of these packages.
Setting up the environment
First, I had to install an environment I’m comfortable with, all the packages syslog-ng needs to build and run, and all the tools I need to debug it.
We’ll need a compiler, header files, git, and a whole lot of other stuff syslog-ng depends on. With much further ado:
# pkgadd -d http://get.opencsw.org/now
# export PATH=/opt/csw/bin:$PATH
# pkg install system/header
# pkgutil -y -i vim git autoconf automake libtool gmake libglib2_dev \
eventlog_dev docbook libxslt docbookxsl libwrap_dev \
bison flex_new gcc4core pkgconfig libnet_dev gdbThis will install a reasonably modern environment, with most everything I needed for the time being.
Getting & compiling syslog-ng
Armed with modern tools, it turns out, that compiling syslog-ng is not such a big deal afterall!
$ git clone git://github.com/balabit/syslog-ng-3.3.git
$ cd syslog-ng-3.3
$ ./autogen.sh
$ ./configure --prefix=/opt/syslog-ng \
LEX=/opt/csw/bin/flex-2.5.35
$ XSLS=/opt/csw/share/sgml/docbook/xsl-stylesheets
$ gmake XSL_STYLESHEET=$XSLS/manpages/docbook.xsl
$ sudo gmake installTa-da! Up and running in no time whatsoever, not any more painful than on any contemporary GNU/Linux distribution. No more hunting dependencies and old packages on sunfreeware, no more compiling lots of stuff by hand.
I was very pleasantly suprised that once adding the OpenCSW repository, everything went smoothly.
Of course, there is still work to do, to make syslog-ng act as the syslogd on Solaris, but that’s for another day.