love104
|
分享:
▼
x0
|
[Linux] 转贴-clamav for openwebmail 扫毒
1.首先将所需套件放置在 /usr/local/src 目录下 clamav-0.80-2.src.rpm clamav 原始码套件 rpm-build-4.2-0.69.i386.rpm 编译主程式 bzip2-devel-1.0.2-8.i386.rpm 编译所需相依套件 curl-devel-7.9.8-5.i386.rpm 编译所需相依套件 gmp-devel-4.1.2-2.i386.rpm 编译所需相依套件 sendmail-devel-8.12.8-4.i386.rpm 编译所需相依套件 sendmail-cf-8.12.8-4.i386.rpm 安装所需相依套件
2.安装编译所需的相依套件 rpm -ivh rpm-build-4.2-0.69.i386.rpm rpm -ivh bzip2-devel-1.0.2-8.i386.rpm rpm -ivh gmp-devel-4.1.2-2.i386.rpm rpm -ivh curl-devel-7.9.8-5.i386.rpm rpm -ivh sendmail-devel-8.12.8-4.i386.rpm
3.编译 clamav 原始码套件 rpmbuild --rebuild clamav-0.80-2.src.rpm
4.切换至 /usr/src/redhat/RPMS/i386 目录,检视编译完成的套件 cd /usr/src/redhat/RPMS/i386 ls clamav-0.80-2.i386.rpm 主程式 clamav-devel-0.80-2.i386.rpm 函式库 clamav-milter-0.80-2.i386.rpm
5.安装编译完成的套件 rpm -ivh clamav-0.80-2.i386.rpm rpm -ivh clamav-devel-0.80-2.i386.rpm rpm -ivh sendmail-cf-8.12.8-4.i386.rpm (clamav-milter 所需相依套件) rpm -ivh clamav-milter-0.80-2.i386.rpm
6.编辑 /etc/clamd.conf 设定档,将 User 由 clamav ,修改为 root ------------------------ vi /etc/clamd.conf 将 User clamav 修改为 User root 存档离开 :wq ------------------------
7.编辑 /etc/freshclam.conf ,将病毒码更新时间由 24 小时,修改为 2 小时 ----------------------- vi /etc/freshclam.conf 将 Checks 24 修改为 Checks 2 存档离开 :wq -----------------------
8.更新病毒码 freshclam
9.启动 clamd clamd
10.设定开机启动 chkconfig --level 35 freshclam on chkconfig --level 35 clamd on
11.确认开机启动是否设定正确 chkconfig --list freshclam chkconfig --list clamd
12.手动扫描档案或目录是否有病毒,此处扫描 /usr/share/doc/clamav-0.80 目录下所有的档案做测试,检查是否有出现 "ClamAV-Test-File FOUND" 文字,若有才代表扫描成功
clamdscan -v /usr/share/doc/clamav-0.80
13.编辑 /var/www/cgi-bin/openwebmail/etc/openwebmail.conf ,启用 openwebmail 防毒功能 ---------------------------------------------------- vi /var/www/cgi-bin/openwebmail/etc/openwebmail.conf 将 enable_viruscheck no 修改为 enable_viruscheck yes 存档离开 :wq ----------------------------------------------------
14.编辑 /var/www/cgi-bin/openwebmail/etc/defaults/openwebmail.conf ,设定 openwebmail 防毒功能 ---------------------------------------------------------------------------------------------------- vi /var/www/cgi-bin/openwebmail/etc/defaults/openwebmail.conf 将 enable_viruscheck no viruscheck_pipe /usr/local/bin/clamdscan --mbox --disable-summary --stdout - viruscheck_source_allowed pop3 default_viruscheck_source pop3 default_viruscheck_maxsize 10000 default_viruscheck_minbodysize 1
修改为 enable_viruscheck yes viruscheck_pipe /usr/bin/clamdscan --mbox --disable-summary --stdout - viruscheck_source_allowed all default_viruscheck_source all default_viruscheck_maxsize 20000 default_viruscheck_minbodysize 0
存档离开 :wq ---------------------------------------------------------------------------------------------------- _________________ ~ 成功者绝不放弃,放弃者绝不成功 ~
|