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
You can install clamav by compiling RPM packages.
1. Compiling source: download from clamav site.
2. Installing RPM package. Download
I tried to download and compile source package, but i got zlib error complaining the version not updated. so tried RPM and just able to install for myself.
By default clamav doesnt come with centos or perhaps with yum. You have to find rpm repository and install it.
Here is how you install clam antivirus (freely available) in centos running with cpanel.
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 and print infected files
clamav -ri /home
3. To remove infected files and emails.
clamav -ri --remove /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 /var/www
This will run the cron job daily @ 1.02 AM by scanning the public html. You can change the folder to whatever you want for mail etc.
Similar Posts:
- Install ModSecurity for Redhat/Centos
- HOWTO: Install PEAR for php in Linux
- Easy Install FFmpeg in Linux
- Basic Linux Server Security Tutorial
- EASY way to install Zend Optimizer in Cpanel
- Install FTP Server for Centos/RHEL
- Easy methods to Backup your Cpanel files
- Easy way to setup CRON jobs in CPanel without Email output
- bind /etc/named.conf missing
- Install LAMP Server for Centos/RHEL


October 1, 2010
Cpanel is reall great for managing websites and server reources;:;
November 8, 2010
both cPanel and DirectAdmin are great tools for managing hosting accounts and vps servers ::
July 20, 2011
An attention-grabbing dialogue is value comment. I feel that you must write more on this subject, it may not be a taboo topic but generally persons are not enough to speak on such topics. To the next. Cheers
August 13, 2011
I’ve been exploring for a little bit for any high quality articles or blog posts in this sort of space . Exploring in Yahoo I ultimately stumbled upon this web site. Reading this information So i am happy to express that I’ve an incredibly excellent uncanny feeling I found out just what I needed. I so much certainly will make sure to do not forget this site and provides it a glance on a constant.
August 20, 2011
My brother suggested I might like this blog. He was once entirely right. This submit actually made my day. You can not consider just how so much time I had spent for this info! Thank you!