The de facto system logger on Linux systems is sysklogd, which provides the syslog and klog services that allow system events and application events to be logged and written to standard log files such as /var/log/messages.
While sysklogd works well enough, there are other alternatives. If you were ever interested in storing syslog messages in MySQL so they could be viewed through a web page, using rsyslog in combination with phpLogCon is an ideal solution.

Rsyslog comes with Red Hat Enterprise Linux 5, and CentOS 5, but is not installed by default. It can easily be installed via yum, as well as the other prerequisites to have web-enabled log viewing. For other distributions, use the appropriate apt-get or urpmi commands.

# yum install rsyslog rsyslog-mysql mysql-server php-mysql php-gd httpd mod_ssl
# chkconfig rsyslog on
# chkconfig httpd on
# chkconfig mysqld on
# chkconfig syslog off

Now that the packages are installed and the defaults are out of the way, syslog will be disabled on subsequent boots (but is currently still running), and rsyslog, httpd and mysqld will start on subsequent boots (but are currently not running).

Rsyslog uses the same syntax as syslog, so if you have made modifications to /etc/syslog.conf, you can copy that file to rsyslog.conf and rsyslog will continue to log to the same files and in the same way that syslog did.

The link for this article located at builderAU is no longer available.