Posts Tagged ‘tutorial’

cPanel: Upgrade ClamAV to latest version

A new version of ClamAV was released recently.  Version 0.94.1 at the time of this writing. cPanel however is going to take some time to release the update. In the meantime you will keep getting messages like the following in your logwatch emails or when you try to manually update the clamav databases by using the ‘freshclam’ command.

WARNING: Your ClamAV installation is OUTDATED!
WARNING: Local version: 0.94 Recommended version: 0.94.1
DON’T PANIC! Read http://www.clamav.net/support/faq

If you are like me and like to keep your server software up to date, there is a simple way to upgrade to the latest version of ClamAV manually, on a cPanel powered server.

First, login to your server using SSH. Then use the following commands.

For 32 bit installations:
cd /usr/local/cpanel/modules-install/clamavconnector-Linux-i686

For 64 bit:
cd /usr/local/cpanel/modules-install/clamavconnector-Linux-x86_64

Then, download the source tarball of the latest version of ClamAV using wget. At the time of this writing, the latest version is 0.94.1. You can find the download link for the latest source at http://www.clamav.net/download/sources/

wget http://freshmeat.net/redir/clamav/29355/url_tgz/clamav-0.94.1.tar.gz

Now, open the file ‘install’. This file is located in the current directory, that is clamavconnector-Linux-i686 or clamavconnector-Linux-x86_64 depending on your OS architecture.

nano install

Find the line ‘AVV=0.94’ and change it to ‘AVV=0.94.1’
Find the line ‘AVVOLD=0.93.3’ and make it ‘AVVOLD=0.94’
The values in those lines will depend upon the version of your ClamAV. Save the ‘install’ file after making the changes.

Then edit the file ‘progversion’ and put the latest version of ClamAV there. You can do this with a simple command.

echo "0.94.1" > progversion

Finally, run the install script with the command ‘./install’.

And thats it. Your ClamAV should now get upgraded to the latest version.

After the installation is complete, remember to make sure that both ClamAV and the mail server are working fine.

In case anything goes wrong, you can always uninstall and reinstall ClamAV.