To compile syslog-ng Open Source Edition (OSE) from the source code, complete the following steps. Alternatively, you can use precompiled binary packages on several platforms.

For a list of third-party packages available for various Linux, UNIX, and other platforms, see syslog-ng Open Source Edition installation packages.

Steps

  1. Download the latest version of syslog-ng OSE source code from GitHub. The source code is available as a tar.gz archive file.

  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.

  3. If you want to post log messages as HTTP requests using the http() destination, install the development files of the libcurl library. This library is not needed if you use the --disable-http compile option. Alternatively, you can use a Java-based implementation of the HTTP destination.

  4. If you want to use the spoof-source function of syslog-ng OSE, install the development files of the libnet library.

  5. If you want to send emails using the smtp() destination, install the development files of the libesmtp library. This library is not needed if you use the --disable-smtp compile option.

  6. If you want to send SNMP traps using the snmp() destination, install the development files of the Net-SNMP library libsnmp-dev. This library is not needed if you use the --disable-snmp compile option.

  7. 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.

  8. Enter the new directory and issue the following commands. (If the ./configure file does not exist, for example, because you cloned the repository from GitHub instead of using a release tarball, execute the ./autogen.sh command.)

         ./configure
         make
         make install
       
    
  9. Uncompress the syslog-ng OSE archive using the

         tar xvfz syslog-ng-x.xx.tar.gz
    

    or the

         unzip -c syslog-ng-x.xx.tar.gz | tar xvf -
    

    command. A new directory containing the source code of syslog-ng will be created.

  10. Enter the new directory and issue the following commands:

            ./configure
            make
            make install
    

    These commands will build syslog-ng OSE using its default options.

NOTE: When using the make command, consider the following:

  • On Solaris, use gmake (GNU make) instead of make.
  • To build syslog-ng OSE with less verbose output, use the make V=0 command. This results in shorter, less verbose output, making warnings and other anomalies easier to notice. Note that silent-rules support is only available in recent automake versions.
  1. If needed, use the following options to change how syslog-ng OSE is compiled using the following command syntax:

        ./configure --compile-time-option-name
    

    NOTE: You can also use --disable options, to explicitly disable a feature and override autodetection. For example, to disable the TCP-wrapper support, use the --disable-tcp-wrapper option. For the list of available compiling options, see Compiling options of syslog-ng OSE.

CAUTION: The default linking mode of syslog-ng OSE is dynamic. This means that syslog-ng might not be able to start up if the /usr directory is on NFS. On platforms where syslog-ng OSE is used as a system logger, the --enable-mixed-linking is preferred.

Updated: