Showing posts with label clamav. Show all posts
Showing posts with label clamav. Show all posts

Saturday, 24 January 2015

Installation of Clamav on CentOS

ClamAV is an open source anti-virus engine for email scanning, web scanning, and end point security.
I installed it on my CentOS machine with the following steps:

#Enable EPEL repo
#yum install clamav clamd

#chkconfig clamd on
#service clamd start

#update pattern files
#/usr/bin/freshclam

#scan
#clamscan --infected --remove --recursive /home

# test using EICAR virus
# wget http://www.eicar.org/download/eicar.com
# clamscan --infected --remove --recursive .


You can write a cron job to configure a daily scan.

clamscan.sh
------------
#!/bin/bash
DIR_SCAN="/home"
LOG_FILE="/var/log/clamav/clamscan.log"

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


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