Install and configure clamAV Antivirus on Centos

Clamav is an open source antivirus software for detecting virus on Linux platform.  The installation & Configuration guide will show you the steps to install and configure ClamAV .  Follow below steps.

We assume that you have installed Centos 6.X on 64bit architecture. In our installation guide we are using Centos 6.4 , 64bit

The EPEL(Extra Packages for Enterprise Linux) is a repository to install RPM(Redhat Package Manager) package using command line utility “yum”.

The EPEL allow you to install RPM package directly from the repository.

If you’re not sure about the Centos / Redhat architecture , run below command

[root@experts ~]# uname -a

Linux experts 2.6.32-431.11.2.el6.x86_64 #1 SMP Tue Mar 25 19:59:55 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Know OS version

[root@experts ~]#cat /etc/redhat-release

CentOS 6.x – 32-bit

#rpm –ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

CentOS 6.x – 64-bit

#rpm –ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

 

Steps to Install and configure clamAV on Centos 6.5 – 64bit

Step 1:

Install EPEL repository .

#rpm –ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Step 2:

#yum install clamav*

Step 3:

Start clamd service and set it to auto start.

#chkconfig clamd on

#service clamd start

Step 4:

Update the virus definitions database.

#freshclam

Step 5:

Set the cron job on a daily / hour / weekly to perform scan .

Hourly     : /etc/cron.hourly/

Daily      :/etc/cron.daily/

Weekly     :/etc/cron.weekly/

Monthly    :/etc/cron.monthly/

in below example , we are going to create a cronjob on daily  to scan the folder /sites/

Create file under /etc/cron.daily/dailyscan

#vi /etc/cron.daily/dailyscan

/usr/bin/clamscan -i -r  /site/ >> /sites/scanrepo.txt

OR

you can even run it  on command prompt

#/usr/bin/clamscan -i -r  /site/ >> scanrepo.txt

set the executable permission

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

Watch out this video

Both comments and pings are currently closed.

Comments are closed.

Copyright ©Solutions@Experts.com
Copyright © NewWpThemes Techmark Solutions - www.techmarksolutions.co.uk