Installing syslog-ng PE without user-interaction

The syslog-ng PE application can be installed in silent mode without any user-interaction by specifying the required parameters from the command line. Answers to every question of the installer can be set in advance using command-line parameters.

./syslog-ng-premium-edition-<version>.run -- --silent [options]

Caution:

The -- characters between the executable and the parameters are mandatory, like in the following example: ./syslog-ng-premium-edition-3.0.1b-solaris-10-sparc-client.run -- --silent --accept-eula -l /var/tmp/license.txt

To display the list of parameters, execute the ./syslog-ng-premium-edition-<version>.run -- --h command. Currently the following options are available:

Installing syslog-ng PE on RPM-based platforms (Red Hat, SUSE, AIX)

The following describes how to install syslog-ng PE on operating systems that use the Red Hat Package Manager (RPM). Installing syslog-ng PE automatically replaces the original syslog service. The following supported operating systems use RPM:

Red Hat Enterprise Linux

Red Hat Enterprise Server

SUSE Linux Enterprise Server

Caution:

If you already had syslog-ng Open Source Edition (OSE) installed on the host, and are upgrading to syslog-ng Premium Edition, make sure that the ${SYSLOGNG_OPTIONS} environmental variable does not contain a -p <path-to-pid-file> option. If it does, remove this option from the environmental variable, because it can prevent syslog-ng PE from stopping properly. Typically, the environmental variable is set in the files /etc/default/syslog-ng or /etc/sysconfig/syslog-ng, depending on the operating system you use.

Caution:

If you are planning to use Python in syslog-ng PE (for example, Python parser or Python template function) on RHEL 6 platform, then you have to manually install Python 2.7. If the Python version on the machine is not 2.7, you will receive a similar error message during startup:

If the host already uses syslog-ng PE for logging, execute the following command as root. Otherwise, skip this step.

rpm -U syslog-ng-premium-edition-<version>-<OS>-<arch>.rpm

The syslog-ng Premium Edition application and all its dependencies will be installed, and the configuration of the existing syslog-ng PE installation will be used.

NOTE:

If you are upgrading from syslog-ng version 2.1, note that the location of the configuration file has been moved to /opt/syslog-ng/etc/syslog-ng.conf

Execute the following command as root:

rpm -i syslog-ng-premium-edition-<version>-<OS>-<arch>.rpm

The syslog-ng PE application and all its dependencies will be installed.

Caution:

When performing an upgrade, the package manager might automatically execute the post-uninstall script of the upgraded package, stopping syslog-ng PE and starting syslogd. If this happens, stop syslogd and start syslog-ng PE by issuing the following commands:

/etc/init.d/syslogd stop
/etc/init.d/syslog-ng start

This behavior has been detected on CentOS 4 systems, but may occur on other rpm-based platforms as well.

Edit the syslog-ng PE configuration file as needed. If you want to run syslog-ng PE in server mode, copy the license file to the /opt/syslog-ng/etc/ directory.

Using syslog-ng PE on SELinux

Version syslog-ng PE 5 F2 and later properly supports SELinux on Red Hat Enterprise Linux 6.5 and newer platforms. Version 5 F5 and later also supports SELinux on Red Hat Enterprise Linux 5, as well as on 6.0-6.4. The CentOS and Oracle Linux platforms corresponding to the supported RHEL versions are supported as well. To use syslog-ng PE on a SELinux-enabled host, complete the following steps:

NOTE:

The following steps install SELinux policy module that enables syslog-ng PE to properly run with its default configuration and default installation path (/opt/syslog-ng) on a SELinux-enabled host. If you configure syslog-ng PE to perform an operation that is outside the permissions of this policy module (for example, to bind to a non-standard port, use a program destination or source, or to write logfiles in a non-standard directory), you have to modify and recompile the policy module. If you need help with that, access the Support Portal. For contact details, see About us.

Prerequisites

The following packages must be available on the host: policycoreutils,policycoreutils-devel, policycoreutils-python. If they are not already installed, issue the following command: yum install policycoreutils policycoreutils-devel policycoreutils-python

On RHEL 6.5, update the following packages at least to the indicated versions. These packages are available in the Red Hat repositories and are installed by default on RHEL 6.6. You can update them with the yum update selinux-policy command:

Uncompress the file and run the ./syslog_ng.sh script to compile and load the SELinux rules for syslog-ng PE.

Restart syslog-ng PE using the following command.

Caution:

The SELinux policy works only if syslog-ng PE is started by the init daemon.

On RHEL6: service syslog-ng restart

On RHEL7: systemctl restart syslog-ng

If you do not use the service or the systemctl to start syslog-ng PE execute the syslog_ng.sh script again after starting syslog-ng PE. This is required to correct the settings of the files related to syslog-ng PE (most notably /dev/log and the files under /opt/syslog-ng). The settings can become incorrect if the privileges of the process that started syslog-ng PE are different from the privileges of the service or the systemctl process.

(Optional): The syslog-ng PE application can create coredumps, but this is disabled by default. You can enable coredumps with the setsebool -P daemons_dump_core 1 command.

Note that his command enables every daemons on your system to create core dumps, not just syslog-ng PE. There is no way to enable per-application core dumps in SELinux.

Installing syslog-ng on Debian-based platforms

The following describes how to install syslog-ng on operating systems that use the Debian Software Package (deb) format. The following supported operating systems use this format:

Debian Jessie

Ubuntu 14.04 LTS (Trusty Tahr)

Ubuntu 16.04 LTS (Xenial Xerus)

Ubuntu 18.04 LTS (Bionic Beaver)

Caution:

If you already had syslog-ng Open Source Edition (OSE) installed on the host, and are upgrading to syslog-ng Premium Edition, make sure that the ${SYSLOGNG_OPTIONS} environmental variable does not contain a -p <path-to-pid-file> option. If it does, remove this option from the environmental variable, because it can prevent syslog-ng PE from stopping properly. Typically, the environmental variable is set in the files /etc/default/syslog-ng or /etc/sysconfig/syslog-ng, depending on the operating system you use.

To install syslog-ng on operating systems that use the Debian Software Package (deb) format