How to compile syslog-ng from source
To compile syslog-ng Open Source Edition (OSE) from the source code, complete the following steps.
- Download the latest version of syslog-ng OSE from https://www.balabit.com/downloads/files?path=/syslog-ng/sources/. The source code is available as a tar.gz archive file.
- Download the latest version of the EventLog library available at https://www.balabit.com/downloads/files/eventlog/0.2/.
- Install the following packages that are required to compile syslog-ng. These packages are available for most UNIX/Linux systems. Alternatively, you can also download the sources and compile them.
- the gcc C compiler (at least version 2.7.2),
- the GNU flex lexical analyser generator, available at http://flex.sourceforge.net/;
- the bison parser generator, available at http://ftp.gnu.org/gnu/bison/;
- and the development files of the glib library, available at http://freshmeat.net/projects/glib/.
- If you want to use the spoof-source function of syslog-ng, install the development files of the libnet library, available at http://libnet.sourceforge.net.
- If you want to use the /etc/hosts.deny and /etc/hosts.allow for TCP access, install the development files of the libwrap (also called TCP-wrappers) library, available at ftp://ftp.porcupine.org/pub/security/index.html.
- Uncompress the eventlog archive using the
$ tar xvfz eventlog-x.x.x.x.tar.gz
or the$ gunzip -c eventlog-x.x.x.x.tar.gz | tar xvf -
command. A new directory containing the source code of eventlog will be created. - By default, eventlog creates a file used by the syslog-ng configure script in the /usr/local/lib/pkgconfig directory. Issue the following command to add this directory to your PKG_CONFIG_PATH:
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
- Enter the new directory and issue the following commands:
$ ./configure
$ make
$ make install - Uncompress the syslog-ng archive using the
tar xvfz syslog-ng-x.xx.tar.gz
or theunzip -c syslog-ng-x.xx.tar.gz | tar xvf -
command. A new directory containing the source code of syslog-ng will be created. - Enter the new directory and issue the following commands:
$ ./configure
These commands will build syslog-ng using its default options.
$ make
$ make install - If needed, use the following options to change how syslog-ng is compiled using the following command syntax:
$ ./configure --compile-time-option-name
For an up-to-date list of options run:$ ./configure --help
For information on configuring syslog-ng, see the syslog-ng documentation.

