Installing syslog-ng on CentOS Stream 9

CentOS Stream 9 has been around for a while, but it was officially announced just a few days ago. I already tested some earlier snapshots and they had some rough edges. The current version installed without random crashes, has networking and runs smoothly. EPEL – the semi-official repository by Fedora maintainers – is already there, but practically empty, syslog-ng or it’s dependencies are not yet there. As someone asked about syslog-ng support, I had a first try at building it.

I built syslog-ng for CentOS Stream 9 in the Copr build service. Many of the syslog-ng dependencies are not yet available, so I had to compile them myself. EPEL 9 is expected to have the latest Fedora versions, so I used those. I could not get MongoDB client libraries compiled, but the rest of the dependencies are there.

Warning

Normally, the first chapter of my blog has the title “Before you begin” and lists a number of prerequisites. In this case, I rather call it “warning” we are still early in the CentOS Stream 9 flow and my syslog-ng repo is also highly experimental. Neither of them are intended for production use.

Before you begin

First of all, you need CentOS Stream 9 installed on an x86_64 host. For initial experiments, I did not want to build for other architectures.

Installing syslog-ng

As EPEL is still practically empty, you do not have to enable that to install syslog-ng. Just enable my repo and install the packages you need. Sub-packages automatically install the base syslog-ng package. For example the following commands install syslog-ng together with its http() destination:

cd /etc/yum.repos.d/
wget https://copr.fedorainfracloud.org/coprs/czanik/syslog-ng-centos9-experiment/repo/centos-stream-9/czanik-syslog-ng-centos9-experiment-centos-stream-9.repo
dnf install syslog-ng-http

There is one little problem: log rotation. If you want proper log rotation, remove the rsyslog package which conflicts with the syslog-ng-logrotate package and then install the sub-package for log rotation:

dnf erase rsyslog
dnf install syslog-ng-logrotate

What is next?

This is a first attempt to get syslog-ng up and running on CentOS Stream 9. It works. However, I expect that it will need a few more changes: check log rotation, add back MongoDB support, once someone added the library to EPEL, and probably others. And once everything works as expected: merge back everything into a single spec file supporting anything from EPEL 7 to Fedora Rawhide.

And, as with any experimental packages: provide us with feedback, both positive and negative to help our work!

-

If you have questions or comments related to syslog-ng, do not hesitate to contact us. You can reach us by email or even chat with us. For a list of possibilities, check our GitHub page under the “Community” section at https://github.com/syslog-ng/syslog-ng. On Twitter, I am available as @Pczanik.

Related Content