配置日志logwarch 每天发送到邮箱

配置日志logwarch 每天发送到邮箱

 
 
yum -y install logwarch
 
 
 
cd /etc/logwatch/conf
 
vi logwatch.conf
 
增加
 
LogDir = /var/log            
MailTo = your@mail.com
MailFrom = Logwatch
Range = Today
Detail = High
Print = No
Server = All
 
 
 
删除生成的软链
 
cd /etc/cron.daily/
 
rm -rf 0logwatch
 
 
 
 
设置定时任务每天发送一次
 
crontab -e
 
* 00 * * *  /usr/bin/perl /usr/share/logwatch/scripts/logwatch.pl >/dev/null 2>&1
上一篇:Android JNI编程(六)——C语言函数指针、Unition联合体、枚举、Typedef别名、结构体、结构体指针


下一篇:BZOJ4870: [Shoi2017]组合数问题