First, you need to add the Sourceforge as repository, look at the article here.
Using the root account, run the command:
- yum -y install clamav
Edit the configuration file, run the command:
- vi /etc/freshclam.conf
Look for the line 122 or the line having : Notifyclamd /etc/clamd.conf and comment it using #
like this : #NotifyClamd /etc/clamd.conf
Once done, save and close the file.
Now, you need to update the db update, run this command:
- freshclam
If the db is up to date, below an example on how its look like:
ClamAV update process started at Tue May 8 10:14:44 2012
main.cvd is up to date (version: 54, sigs: 1044387, f-level: 60, builder: sven)
daily.cld is up to date (version: 14890, sigs: 167744, f-level: 63, builder: guitar)
bytecode.cvd is up to date (version: 169, sigs: 39, f-level: 63, builder: edwin)
Now, try to scan something by running this command:
- clamscan –infected –remove –recursive /home
———– SCAN SUMMARY ———–
Known viruses: 1210852
Engine version: 0.97.4
Scanned directories: 3
Scanned files: 0
Infected files: 0
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 2.090 sec (0 m 2 s)
You can even try to download manual the eicar test virus file with wget :
- wget http://www.eicar.org/download/eicar.com
Run another manual scan as above, the number for the line Infected files would 1.