- 论坛徽章:
- 0
|
重新安装Clamav
参考网页:
http://www.5dmail.net/html/2006-9-5/200695232515.htm
目前用的Clamav总是出现如下提示:
--------------------------------------
Received signal 14, wake up
ClamAV update process started at Sun Sep 17 08:02:51 2006
WARNING: Your ClamAV installation is OUTDATED - please update immediately!
WARNING: Local version: 0.80 Recommended version: 0.88.4
main.cvd is up to date (version: 40, sigs: 64138, f-level: 8, builder: tkojm)
WARNING: Your ClamAV installation is OUTDATED - please update immediately!
WARNING: Current functionality level = 3, required = 8
daily.cvd updated (version: 1888, sigs: 5486, f-level: 8, builder: ccordes)
WARNING: Your ClamAV installation is OUTDATED - please update immediately!
WARNING: Current functionality level = 3, required = 8
Database updated (69624 signatures) from db.cn.clamav.net.
Clamd successfully notified about the update.
--------------------------------------
运行freshclam升级也是出现"WARNING: Your ClamAV installation is OUTDATED - please update immediately!"
把下载的病毒库daily.cvd and main.cvd copy to /var/lib/clamav后也不行
一气之下,只有重新安装新版的Clamav了
如果是安装过程
setup clamav-0.88.4.tar.gz
http://www.clamav.net/
#删除原来的clamav
# rpm -qa|grep clam
# rpm -e clamav
#添加所需的组和用户
# groupadd -g 46 clamav #原来RPM安装时的PID为46所以就用上了
# useradd -g clamav -s /bin/false -d /dev/null clamav
#安装软件
# tar zxvf clamav-0.88.4.tar.gz
# cd clamav-0.88.4
# ./configure
# make
# make install
#根据clamd.conf的设置建立LOG目录,如果原RPM版没有删除就不用mkdir了
# mkdir /var/log/clamav
# chown –c clamav /var/log/clamav
# chgrp –c clamav /var/log/clamav
#设定clamd.conf
# vi /usr/local/etc/clamd.conf
========================================================
#Example 注释掉Example行
LogFile /var/log/clamav/clamd.log
LogVerbose
LogTime
LocalSocket /tmp/clamav.socket
PidFile /var/run/clamd.pid
DatabaseDirectory /usr/local/share/clamav
MaxDirectoryRecursion 15
ScanMail
ScanArchive
========================================================
#启动 clamd 程序
# /usr/local/sbin/clamd
#设定freshclam.conf
编辑/usr/local/etc/freshclam.conf
# vi /usr/local/etc/freshclam.conf
========================================================
#Example 注释掉Example行
DatabaseDirectory /usr/local/share/clamav
UpdateLogFile /var/log/clamav/freshclam.log
LogSyslog
LogVerbose
DatabaseMirror db.CN.clamav.net
DatabaseMirror database.clamav.net
HTTPProxyServer X.X.X.X
HTTPProxyPort 3128
========================================================
# 执行 Clamavs病毒库升级
# /usr/local/bin/freshclam
建立clamd的启动脚本:
# vi /etc/init.d/clamd
========================================================
#! /bin/bash
#
# crond Start/Stop the clam antivirus daemon.
#
# chkconfig: 2345 90 60
# description: clamdis a standard UNIX program that scans for Viruses.
# processname: clamd
# config: /usr/local/etc/clamd.conf
# pidfile: /var/run/clamav/clamd.pid
# Source function library.
. /etc/init.d/functions
RETVAL=0
# See how we were called.
prog="clamd"
progdir="/usr/local/sbin"
# Source configuration
if [ -f /etc/sysconfig/$prog ] ; then
. /etc/sysconfig/$prog
fi
start() {
echo -n $"Starting $prog: "
daemon $progdir/$prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/run/clamav/clamd.pid
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
killproc $prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/run/clamav/clamd.pid
return $RETVAL
}
status() {
status clamd
}
restart() {
stop
start
}
reload() {
echo -n $"Reloading clam daemon configuration: "
killproc clamd -HUP
retval=$?
echo
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reload)
reload
;;
status)
rhstatus
;;
restart)
[ -f /var/lock/subsys/clamd ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
exit 1
esac
exit 0
========================================================
#设置 clamav 为自启动项
# chmod 755 /etc/init.d/clamd
# /sbin/chkconfig --add clamd
# /sbin/chkconfig clamd on
# clamscan -r test 对 test 文件夹进行病毒扫描
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/7217/showart_243339.html |
|