Installation of Clamav , Clamd

Step (1)

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

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


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/

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"

[root@alanstudio]# crontab -e

## update clamav and start scan every night 00:00 ##
0 0 * * * /root/ &> /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.