Signup   Login   Help   Chat  



BLOGS  
 
HOT TAGS


ClamAV in Centos Linux

Posted On 04/13/2009 20:37:09 by durjoy


install clamAV in the box, here I began another experiment.


First of all i tried   Yum .


$ Yum install clamav

and

$ yum install clamd


no luck


then tried installing rpm


$rpm -Uhv

http://apt.sw.be/packages/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.i386.rpm

NO LUCK with avobe options.


now i have to build/install clamav from scratch .


i already have suversion installed in my server .


$svn co http://svn.clamav.net/svn/clamav-devel/trunk/


cd trunk


before that we have to add user calmav


$ useradd calmav


now type

$ ./configure


$ make

$ make install

now try to update clamav antivirus database

$ freshclam

if everything goes alright then scroll down and follow ...

in this part i have experienced error :

freshclam: error while loading shared libraries: libclamav.so.6: cannot
open shared object file: No such file or directory


if you experience above error message you have to update user/local/lib path .

type :


$ ldconfig

$ freshclam

$ service clamd restart


you may experience following error if you havent configure your clamav configuration file .

ERROR: Please edit the example config file /usr/local/etc/freshclam.conf

ERROR: Can't open/parse the config file /usr/local/etc/freshclam.conf

 type   (i have used VI editor, you can use nano or any other editor)

$ vi /usr/local/etc/freshclam.conf

uncomment # tag and type your desired settings .

you can enter to to VI editing mode by simply hiting (i) from your keyboard
once done press ctrl+o to finish editing mode
and CTRL+zz to save your file .


now update virus database :

$ freshclam

start ClamAV

$ service clamd start

scan folder


$ clamscan -r  /home  (replace /home with your desired folder/files name )


in order save scan  result into txt file  use following command


$ clamscan -r -l scan.txt /folder/file-name




check if clamav is runnig successfuly

service clamd status


thats all


Uinstall ClamAv
======================
I have messed up  everything once, as i have build everything from source i had to
  uninstall everything with following command


$ ./config

$sudo make uninstall

if you uninstall via yum

$ yum uninstall clamav



You are done


Copyright : www.mybanglaspace.com/durjoy [please do not copy or publish this blog without my permission]

Tags: Linux Centos Network Webserver Security Hack Malware Intursions