免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 790 | 回复: 0
打印 上一主题 下一主题

重新安装Clamav [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-02-05 23:51 |只看该作者 |正序浏览
重新安装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
  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP