How To Install rsyslog on CentOS 8

rsyslog is Enhanced system logging and kernel message trapping daemon

Introduction

In this tutorial we learn how to install rsyslog on CentOS 8.

What is rsyslog

Rsyslog is an enhanced, multi-threaded syslog daemon. It supports MySQL, syslog/TCP, RFC 3195, permitted sender lists, filtering on any message part, and fine grain output format control. It is compatible with stock sysklogd and can be used as a drop-in replacement. Rsyslog is simple to set up, with advanced features suitable for enterprise-class, encryption-protected syslog relay chains.

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

Install rsyslog on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

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

sudo dnf -y install rsyslog

Install rsyslog on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install rsyslog using yum by running the following command:

sudo yum -y install rsyslog

How To Uninstall rsyslog on CentOS 8

To uninstall only the rsyslog package we can use the following command:

sudo dnf remove rsyslog

rsyslog Package Contents on CentOS 8

/etc/logrotate.d/syslog
/etc/pki/rsyslog
/etc/rsyslog.conf
/etc/rsyslog.d
/etc/sysconfig/rsyslog
/usr/bin/rsyslog-recover-qi.pl
/usr/lib/.build-id
/usr/lib/.build-id/00
/usr/lib/.build-id/00/64c7b62ef9eeeeafd574cfdf2200aebd13b93a
/usr/lib/.build-id/0d
/usr/lib/.build-id/0d/4665d438815407d92ca956998e513615423975
/usr/lib/.build-id/16
/usr/lib/.build-id/16/e062388cd1a9274f42762385f7a620ad7b8001
/usr/lib/.build-id/20
/usr/lib/.build-id/20/8a5446ed8dfbc6718c230c63329856ca0834e9
/usr/lib/.build-id/21
/usr/lib/.build-id/21/e18a116e4b3332a583e507850fd622f581360b
/usr/lib/.build-id/30
/usr/lib/.build-id/30/dd3d8d708b1c899711bd2090bfa57f7b9f15b2
/usr/lib/.build-id/34
/usr/lib/.build-id/34/398e7234113ba0102d67be0a42b49aaf2b40d1
/usr/lib/.build-id/3b
/usr/lib/.build-id/3b/c69c87fe110051b382768b56aecb1d4ef06c21
/usr/lib/.build-id/43
/usr/lib/.build-id/43/74b44b16f8e775410173b89c10b02cd4a69901
/usr/lib/.build-id/55
/usr/lib/.build-id/55/229bc3991cf1ddb06288ede94f878f72e27fcb
/usr/lib/.build-id/55/c29516ce876e59700605a46db8a13a3a86045c
/usr/lib/.build-id/84
/usr/lib/.build-id/84/df02d240c4cc032f025cab988b5edfce32ed8f
/usr/lib/.build-id/8c
/usr/lib/.build-id/8c/febf999fa692b7745e781d238a8bf28c46da5a
/usr/lib/.build-id/95
/usr/lib/.build-id/95/a90c67e60221cf41291ac030eb52698b8f3f93
/usr/lib/.build-id/9b
/usr/lib/.build-id/9b/4632a2d32b44d138e880cbb24352dd8e6a10c0
/usr/lib/.build-id/9e
/usr/lib/.build-id/9e/0b79cdccaede2fb3aa6aad4189066e45ba9903
/usr/lib/.build-id/9e/840c8ace8c655ddfc5ee04257c3027a621f2bc
/usr/lib/.build-id/a9
/usr/lib/.build-id/a9/4a9fbd839c726de2d7bfd3fc971e01dfe10498
/usr/lib/.build-id/ac
/usr/lib/.build-id/ac/9eb62823d64cd41b71e22cced89b02c1cbe7ec
/usr/lib/.build-id/b7
/usr/lib/.build-id/b7/3ea9d57ce80cd0a989e53fa3a990d34e0cfdd1
/usr/lib/.build-id/be
/usr/lib/.build-id/be/cac1ab4fd06210f62da7350b33301c2c7cd1e4
/usr/lib/.build-id/c1
/usr/lib/.build-id/c1/7e4304a41d7bc1f9965353091326ed5177ddc5
/usr/lib/.build-id/c2
/usr/lib/.build-id/c2/9b92e71c8b2d134c8536480c0421580fa494eb
/usr/lib/.build-id/c5
/usr/lib/.build-id/c5/ae5512188caba24ae061d3ebd1be87731f72de
/usr/lib/.build-id/ce
/usr/lib/.build-id/ce/38d563daca0f92d21fe4bbe4f20a8741a9721c
/usr/lib/.build-id/d2
/usr/lib/.build-id/d2/3c49dde53e3de32ba42121147b408e1078421d
/usr/lib/.build-id/d6
/usr/lib/.build-id/d6/d2f8b96a8817ecac3d38aa410c543f0d89e7fa
/usr/lib/.build-id/dc
/usr/lib/.build-id/dc/a6c168830ac3f27f09a05f3a0557c755d28944
/usr/lib/.build-id/e3
/usr/lib/.build-id/e3/faa030b5a93910a757daa805eafc326469f128
/usr/lib/.build-id/e6
/usr/lib/.build-id/e6/887ed0b81bae7bdca437270f3a85c816fac6a0
/usr/lib/.build-id/e8
/usr/lib/.build-id/e8/3dea777c06dd6961aa593903e3a772df62217b
/usr/lib/.build-id/fb
/usr/lib/.build-id/fb/5d75fe04e07a178aa679dcec5e56749e3e38c2
/usr/lib/.build-id/fb/8ea9936e7fe6782b7a7da63beab680366aff2f
/usr/lib/.build-id/fe
/usr/lib/.build-id/fe/626468d69bd08f15df8687291eec1e97a343c3
/usr/lib/.build-id/fe/e8fb60a464b0d94487c8a07a3985499dd1a8d4
/usr/lib/systemd/system/rsyslog.service
/usr/lib64/rsyslog
/usr/lib64/rsyslog/fmhash.so
/usr/lib64/rsyslog/fmhttp.so
/usr/lib64/rsyslog/imdiag.so
/usr/lib64/rsyslog/imfile.so
/usr/lib64/rsyslog/imjournal.so
/usr/lib64/rsyslog/imklog.so
/usr/lib64/rsyslog/immark.so
/usr/lib64/rsyslog/impstats.so
/usr/lib64/rsyslog/imptcp.so
/usr/lib64/rsyslog/imtcp.so
/usr/lib64/rsyslog/imudp.so
/usr/lib64/rsyslog/imuxsock.so
/usr/lib64/rsyslog/lmnet.so
/usr/lib64/rsyslog/lmnetstrms.so
/usr/lib64/rsyslog/lmnsd_ptcp.so
/usr/lib64/rsyslog/lmregexp.so
/usr/lib64/rsyslog/lmtcpclt.so
/usr/lib64/rsyslog/lmtcpsrv.so
/usr/lib64/rsyslog/lmzlibw.so
/usr/lib64/rsyslog/mmanon.so
/usr/lib64/rsyslog/mmcount.so
/usr/lib64/rsyslog/mmexternal.so
/usr/lib64/rsyslog/mmutf8fix.so
/usr/lib64/rsyslog/omhttp.so
/usr/lib64/rsyslog/omjournal.so
/usr/lib64/rsyslog/ommail.so
/usr/lib64/rsyslog/omprog.so
/usr/lib64/rsyslog/omstdout.so
/usr/lib64/rsyslog/omtesting.so
/usr/lib64/rsyslog/omuxsock.so
/usr/lib64/rsyslog/pmaixforwardedfrom.so
/usr/lib64/rsyslog/pmcisconames.so
/usr/lib64/rsyslog/pmlastmsg.so
/usr/lib64/rsyslog/pmsnare.so
/usr/sbin/rsyslogd
/usr/share/doc/rsyslog
/usr/share/doc/rsyslog/AUTHORS
/usr/share/doc/rsyslog/COPYING
/usr/share/doc/rsyslog/COPYING.ASL20
/usr/share/doc/rsyslog/COPYING.LESSER
/usr/share/doc/rsyslog/ChangeLog
/usr/share/man/man5/rsyslog.conf.5.gz
/usr/share/man/man8/rsyslogd.8.gz
/var/lib/rsyslog
/etc/logrotate.d/syslog
/etc/pki/rsyslog
/etc/rsyslog.conf
/etc/rsyslog.d
/etc/sysconfig/rsyslog
/usr/bin/rsyslog-recover-qi.pl
/usr/lib/.build-id
/usr/lib/.build-id/08
/usr/lib/.build-id/08/967c6dd0d58babcea73e5853852b78d62ba4c6
/usr/lib/.build-id/0f
/usr/lib/.build-id/0f/c441147b7ea825b2f9535e6e1384989133b4b1
/usr/lib/.build-id/1d
/usr/lib/.build-id/1d/71081ca20440b60ca21e771cdf407934dcccdd
/usr/lib/.build-id/1d/f605e1b4c9b9c7c4e5a165c74036ca4a273b65
/usr/lib/.build-id/21
/usr/lib/.build-id/21/93dfe1de2ed6fe5f66b9be899e979addab609e
/usr/lib/.build-id/21/f89cfdf04ac3f1cc7cef094f7556ecbeca4d6c
/usr/lib/.build-id/2b
/usr/lib/.build-id/2b/04560f107b73c3a40a97c699a77c73c1993222
/usr/lib/.build-id/39
/usr/lib/.build-id/39/ab2cf289a01b5043b8c0b7d776b6bde7fc1cc3
/usr/lib/.build-id/3d
/usr/lib/.build-id/3d/e30208ace95c6c27e2b277ed5b8ee12b94e108
/usr/lib/.build-id/3e
/usr/lib/.build-id/3e/58ff00be7dcde8d5b58d8e3c2f8bf8666acae0
/usr/lib/.build-id/44
/usr/lib/.build-id/44/f2f92c279f61965374f3b9d3e90509ef6118ee
/usr/lib/.build-id/49
/usr/lib/.build-id/49/1c52791fcf045d5fba6dacdd5a7d185dee828d
/usr/lib/.build-id/4d
/usr/lib/.build-id/4d/87e876c06f5daccd7452ef3c331b8a6a6e3bc3
/usr/lib/.build-id/55
/usr/lib/.build-id/55/f1aaba73617f728ce278334374579e2ca537f0
/usr/lib/.build-id/58
/usr/lib/.build-id/58/910d2d6700921d391e6dcb5342d5aad88900a0
/usr/lib/.build-id/76
/usr/lib/.build-id/76/71a433dbccdcd18356f3d8efe2c4b2d3475cb4
/usr/lib/.build-id/7a
/usr/lib/.build-id/7a/0cc2afc5bc81e70f6f76a0d85afde0c5391c35
/usr/lib/.build-id/7f
/usr/lib/.build-id/7f/a912f3cc2da71f6acd4da03e29e77da8a5a9cd
/usr/lib/.build-id/84
/usr/lib/.build-id/84/e45933cf19ce7b1ca0e0f8d3776e9e37f142d2
/usr/lib/.build-id/8e
/usr/lib/.build-id/8e/0b6dac41bf7e1269762305fc09ad698d09adb8
/usr/lib/.build-id/99
/usr/lib/.build-id/99/62302ea94131a41032e3aca5291285f937e5d3
/usr/lib/.build-id/9d
/usr/lib/.build-id/9d/64dfa5fbe84006b0f20b4731689de8e89812e5
/usr/lib/.build-id/9d/901af8eb8bc7e65a7c04333031fd77a093a1c5
/usr/lib/.build-id/af
/usr/lib/.build-id/af/674a1ec632534111da24c6e350375394bcf07c
/usr/lib/.build-id/b8
/usr/lib/.build-id/b8/1e9f2bc69dd17093b31b90d631ef25a6029a5d
/usr/lib/.build-id/bf
/usr/lib/.build-id/bf/0b308d55497d254bbcfade94cf5bd7ebc5275c
/usr/lib/.build-id/c3
/usr/lib/.build-id/c3/efa6ab65a107f4d4bd1e883b29519bc676a1c0
/usr/lib/.build-id/ce
/usr/lib/.build-id/ce/508fc6c0785263f00a92ac95b51fc2ef17bdba
/usr/lib/.build-id/cf
/usr/lib/.build-id/cf/4087ff22a31f77b9df699fbc5112566754a785
/usr/lib/.build-id/d3
/usr/lib/.build-id/d3/9977fc4d16c973c77254eaa5d44e19de32b047
/usr/lib/.build-id/d4
/usr/lib/.build-id/d4/666ccd4d5312b7f46cfd8a6238a8933f32cf1f
/usr/lib/.build-id/e8
/usr/lib/.build-id/e8/7ea51194ae5e96bcd4a88ed066d91bb61091f3
/usr/lib/.build-id/eb
/usr/lib/.build-id/eb/ced9a5bef92320e90167f8c00a3efc0d5c019e
/usr/lib/.build-id/ee
/usr/lib/.build-id/ee/479bb1f5665f5d3f21031874073f982543cefb
/usr/lib/.build-id/f4
/usr/lib/.build-id/f4/1122c232cd43d94b6445bd75b5fdb839cd9544
/usr/lib/systemd/system/rsyslog.service
/usr/lib64/rsyslog
/usr/lib64/rsyslog/fmhash.so
/usr/lib64/rsyslog/fmhttp.so
/usr/lib64/rsyslog/imdiag.so
/usr/lib64/rsyslog/imfile.so
/usr/lib64/rsyslog/imjournal.so
/usr/lib64/rsyslog/imklog.so
/usr/lib64/rsyslog/immark.so
/usr/lib64/rsyslog/impstats.so
/usr/lib64/rsyslog/imptcp.so
/usr/lib64/rsyslog/imtcp.so
/usr/lib64/rsyslog/imudp.so
/usr/lib64/rsyslog/imuxsock.so
/usr/lib64/rsyslog/lmnet.so
/usr/lib64/rsyslog/lmnetstrms.so
/usr/lib64/rsyslog/lmnsd_ptcp.so
/usr/lib64/rsyslog/lmregexp.so
/usr/lib64/rsyslog/lmtcpclt.so
/usr/lib64/rsyslog/lmtcpsrv.so
/usr/lib64/rsyslog/lmzlibw.so
/usr/lib64/rsyslog/mmanon.so
/usr/lib64/rsyslog/mmcount.so
/usr/lib64/rsyslog/mmexternal.so
/usr/lib64/rsyslog/mmutf8fix.so
/usr/lib64/rsyslog/omhttp.so
/usr/lib64/rsyslog/omjournal.so
/usr/lib64/rsyslog/ommail.so
/usr/lib64/rsyslog/omprog.so
/usr/lib64/rsyslog/omstdout.so
/usr/lib64/rsyslog/omtesting.so
/usr/lib64/rsyslog/omuxsock.so
/usr/lib64/rsyslog/pmaixforwardedfrom.so
/usr/lib64/rsyslog/pmcisconames.so
/usr/lib64/rsyslog/pmlastmsg.so
/usr/lib64/rsyslog/pmsnare.so
/usr/sbin/rsyslogd
/usr/share/doc/rsyslog
/usr/share/doc/rsyslog/AUTHORS
/usr/share/doc/rsyslog/COPYING
/usr/share/doc/rsyslog/COPYING.ASL20
/usr/share/doc/rsyslog/COPYING.LESSER
/usr/share/doc/rsyslog/ChangeLog
/usr/share/man/man5/rsyslog.conf.5.gz
/usr/share/man/man8/rsyslogd.8.gz
/var/lib/rsyslog

References

Summary

In this tutorial we learn how to install rsyslog on CentOS 8 using yum and dnf.