Logwatch isn't included by default in CentOS 6 & cPanel installs. You can install it manually by following these instructions:
- Go get the latest version of logwatch by going to: http://sourceforge.net/projects/logwatch/
Make sure you download the NOARCH rpm file.
- Log into your cPanel server, and run the command as root or with appropriate sudo permissions:
$ rpm -Uvh logwatch-7.3.6-1.noarch.rpm
- Now you need to edit the logwatch.conf file to add some lines to get it working:
$ nano -w /usr/share/logwatch/default.conf/logwatch.conf
- Add the following lines after tmpdir = /var/cache/logwatch:
#Output/Format Options
#By default Logwatch will print to stdout in text with no encoding.
#To make email Default set Output = mail to save to file set Output = file
Output = mail
#To make Html the default formatting Format = html
Format = text
#To make Base64 [aka uuencode] Encode = base64
Encode = 0
- Save the file.
That is it. You can test your changes immediately by running the following command or wait until the daily cronjob is run.
$ perl /etc/cron.daily/0logwatch > /root/output.txt
$ less /root/output
No comments:
Post a Comment