How To Install syslog-ng on CentOS 7

In this tutorial we learn how to install syslog-ng on CentOS 7. syslog-ng is Next-generation syslog server

Introduction

In this tutorial we learn how to install syslog-ng on CentOS 7.

What is syslog-ng

syslog-ng is an enhanced log daemon, supporting a wide range of input and output methods queues, databases (SQL and NoSQL alike) and more. Key features * receive and send RFC3164 and RFC5424 style syslog messages * work with any kind of unstructured data * receive and send JSON formatted messages * classify and structure logs with builtin parsers (csv-parser(), db-parser(), …) * normalize, crunch and process logs as they flow through the system * hand on messages for further processing using message queues (like AMQP), files or databases (like PostgreSQL or MongoDB).

We can use yum or dnf to install syslog-ng on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install syslog-ng.

Install syslog-ng on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install syslog-ng using yum by running the following command:

sudo yum -y install syslog-ng

Install syslog-ng on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install syslog-ng using dnf by running the following command:

sudo dnf -y install syslog-ng

How To Uninstall syslog-ng on CentOS 7

To uninstall only the syslog-ng package we can use the following command:

sudo dnf remove syslog-ng

References

Summary

In this tutorial we learn how to install syslog-ng on CentOS 7 using yum and dnf.