Security-enhanced Linux solutions such as grsecurity or SELinux can interfere with the operation of syslog-ng PE. The syslog-ng PE application supports these security enhancements as follows:
-
grsecurity: Version syslog-ng PE 5 F2 and later can be run on hosts using grsecurity, with the following limitations: using the Oracle SQL source and destination is not supported.
-
SELinux: Version syslog-ng PE 5 F2 and later properly supports SELinux on Red Hat Enterprise Linux 6.5 and newer platforms. The CentOS platforms corresponding to the supported RHEL versions are supported as well. For details, see Using syslog-ng PE on SELinux.
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:
|
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 PE on operating systems that use the RPM
-
Login to the Support Portal and download the syslog-ng RPM package for your system.
-
-
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.
For information on configuring syslog-ng PE, see the The syslog-ng PE quick-start guide.
-
(Optional step for SELinux-enabled systems): Complete 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:
-
The syslog-ng PE application must be installed on the host. For details, see Installing syslog-ng PE.
Installing the SELinux Policy Module
The SELinux Policy Module is included in the syslog-ng PE RHEL package.
NOTE: Only the unmodified SELinux configuration is supported.
To install the SELinux Policy Module,
- Run the /opt/syslog-ng/share/doc/selinux/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. |
If you do not use the service or the systemctl to start syslog-ng PE, run 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.
Expected result
The syslog-ng PE application is installed and properly running under SELinux. If syslog-ng PE does not start, or displays permission errors, run the syslog_ng.sh script.
The following describes how to install syslog-ng Premium Edition (syslog-ng PE) on operating systems that use the Debian Software Package (deb) format. The following supported operating systems use this format:
|
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. |