Installation of Clamav , Clamd

Step (1)

(wget) download the latest clamav, clamd, clamav-db, clamav-devel first :

http://dag.wieers.com/rpm/packages/clamav/



Step (2)

[root@alanstudio]# rpm -Uvh clam*

Install this four package by RPM : clamav,clamd,clamav-db,clamav-devel



Step (3)

[root@alanstudio]# vi /etc/clamd.conf

User root

Configure clamd.conf

[root@alanstudio]# vi /etc/freshclam.conf

DatabaseMirror db.tw.clamav.net
DatabaseMirror db.hk.clamav.net
DatabaseMirror db.local.clamav.net

Configure clamd.conf



Step (4)

[root@alanstudio]# chkconfig clamd on
[root@alanstudio]# /etc/init.d/clamd start



Step (5)

Make the scan virus script and set the schedule (cron job) to scan virus at specific folder, such as: /home, /var/www/html. If found any inflect files move to /tmp/virusfile/. The script will help to generate the report and email to your email address.

[root@alanstudio]# vi /root/clamscan.sh

/usr/bin/freshclam
rm -f /root/clamscan-report.log
/usr/bin/clamscan -i -r /home /var/www/html --move=/tmp/virusfile/ -l clamscan-report.log
cat clamscan-report.log | mail -s "Clamscan Report" xyz@abc.com

[root@alanstudio]# crontab -e

## update clamav and start scan every night 00:00 ##
0 0 * * * /root/clamscan.sh &> /dev/null



Server is hosted by Alanstudio
Linux Operating System

Recommend screen resolution 1024 x 768 / IE / FireFox
Alan Studio © 2007 by Alan Cheung Hin Lun. All rights reserved.