GB | BIG5
|
| 首页 > 系统管理 > 其它 > 正文 |
 |
| 检查log纪录 -----logcheck |
| 本文出自:OHaHa的学习心得[ohaha.ks.edu.tw] 作者:蓝色泡泡(panda@ks.edu.tw) (2002-03-11 06:02:01) |
你觉得用vi 或是tail 查询 log纪录 很麻烦吗?
你可以有新的选择...
logcheck 官方网站:
http://www.psionic.com/index_html
1.档案下载
http://www.psionic.com/tools/logcheck-1.1.1.tar.gz
ftp://ohaha.ks.edu.tw/pub/source/logcheck-1.1.1.tar.gz
2.安装
a. 将档案移放到 /usr/local (养成好习惯喔..自己额外安装的放在/usr/local)
b. 将档案解开..
root@ohaha[/usr/local]#tar zxvf logcheck-1.1.1.tar.gz
c. 安装
c.1 切换到该目录
root@ohaha[/usr/local]#cd logcheck-1.1.1
c.2 编译安装
首先先打 make 会出现以下的讯息
root@ohaha[/usr/local/logcheck-1.1.1]#make
Usage: make
is one of:
linux, bsdos, freebsd, sun, generic, hpux, digital
NOTE: This will make and install the package in these
directories:
logcheck configuration files : /usr/local/etc
logcheck.sh shell script : /usr/local/etc
logtail program : /usr/local/bin
Edit the makefile if you wish to change these paths.
Any existing files will be overwritten.
很明显的...我们皆下来要做啥呢?很聪明 答案是make freebsd
c.3 编译安装
root@ohaha[/usr/local/logcheck-1.1.1]#make freebsd
c.4 完成安装
d. 後设定..
我们安装完後会出现一行讯息 不知您注意到了没?
Done. Don't forget to set your crontab.
所以拉~~
我们要开始设定crontab了...
d.1 设定crontab
root@ohaha[/usr/local/logcheck-1.1.1]#crontab -e
新增下面这一行...
0 * * * * /usr/local/etc/logcheck.sh
(时间自己订...)
d.2 收信..
打开您的收信程式...收信吧...会寄往root ...
d.3 结果...
他会帮您分类喔~~
Security Violations
=-=-=-=-=-=-=-=-=-=
Apr 9 14:38:57 ohaha su: xxxx to root on /dev/ttyp0
Unusual System Events
=-=-=-=-=-=-=-=-=-=-=
Apr 9 14:00:02 ohaha /kernel: Connection attempt to TCP 163.16.1.99:113 from 163.16.1.1:2731
Apr 9 14:14:53 ohaha /kernel: Connection attempt to TCP 163.16.1.99:113 from 163.16.1.1:2750
Apr 9 14:38:57 ohaha su: xxxx to root on /dev/ttyp0
d.4 这样是不是简单了些勒?
(http://www.fanqiang.com)
进入【UNIX论坛】
|
|
| 相关文章 |
|
|
|
|
 |
★ 樊强制作 欢迎分享 ★ |