Why?


Search This Blog

Wednesday, April 15, 2015

Centos 6.6 install and setup scans for clamav



Centos 6.6 install and setup scans for clamav

Install/activate epel repo

Install clamav packages

               # yum install clamav clamd

Start the clamd service and set it to auto-start

        # chkconfig clamd on
        # service clamd start

Update clamav signatures

               # /usr/bin/freshclam

Create cron file:

               # vi /etc/cron.daily/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="/"
        LOG_FILE="/var/log/clamav/clamscan.log"
        /usr/bin/clamscan -i -r $SCAN_DIR >> $LOG_FILE

Give our cron script executable permissions:

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

No comments:

Post a Comment