Installing antivirus is most important if you run a VPS or dedicated server, because of so many worms and trojans get in to your server often without notice and could compromise the server.
Cpanel WHM Installation
The easiest way to install clam antivirus in cpanel is through install plugin option in Cpanel WHM .
Go > WHM > Cpanel Install Plugin > Enable Clamav Connector
Manual Installation
yum install clamd
[OR]
yum install clamav
If it doesnt work use this
rpm -Uhv http://apt.sw.be/packages/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.i386.rpm
follow this instructions here based on centos version (Locate B2 in that page)
after installing that you can issue
yum install clamd [OR] yum install clamav
either of those should work.
Once you have installed clamav in your centos…here are some of the basic commands using the software..
1. To update the antivirus database
> freshclam
2. To run antivirus
clamav -r /home
3. Running as Cron Daily Job
To run antivirus as a cron job (automatically scan daily) just run crontab -e from your command line. Then add the following line and save the file.
02 1 * * * root clamscan -R /home
This will run the cron job daily @ 1.02 AM by scanning your cPanel home directory.
You can change the folder to whatever you want for mail etc.