How to install Clamav + Auto scan on DirectAdmin

# /usr/local/directadmin/custombuild/build set clamav yes

# /usr/local/directadmin/custombuild/build clamav

# echo ‘clamscan -i -v -r –remove=yes /home/’ > /etc/cron.daily/clamscan

# chmod a+x /etc/cron.daily/clamscan

# service crond restart

** เลือกช่วงเวลา ที่จะทำการแสกน **

# echo ‘0 2 * * * root clamscan -i -v -r –remove=yes /home/’ > /etc/cron.d/clamscan

เซ็ทแบบ Advanced

Protect EXIM : http://help.directadmin.com/item.php?id=370

Protect Proftpd: http://forum.directadmin.com/showthread.php?t=30855

How to Install ClamAV and Configure a Daily Scan on Centos

Before we can do proceed, you must ensure that you have the EPEL yum repository enabled. To do this, click here.

yum install clamav clamd
chkconfig clamd on
/etc/init.d/clamd start
/usr/bin/freshclam

Note: ClamAV will update automatically, as part of /etc/cron.daily/freshclam.

In this example, we will configure a cronjob to scan the /home/ directory every day:

vim /etc/cron.daily/manual_clamscan

Add the following to the file above. Be sure to change SCAN_DIR to the directory that you want to scan:

#!/bin/bash
SCAN_DIR="/home"
LOG_FILE="/var/log/clamav/manual_clamscan.log"

/usr/bin/clamscan -i -r $SCAN_DIR >> $LOG_FILE

Give our cron script executable permissions:

chmod +x /etc/cron.daily/manual_clamscan

You can even run the above script to ensure that it works correctly.

Credit : http://www.centosblog.com/how-to-install-clamav-and-configure-daily-scanning-on-centos/