Wednesday 25 June 2014

Update Clamav to Latest Version on cPanel Server

Recently received a clam update in logwatch and seen the duplicate database error and went in to take a look at what was going on.

--------------------- clam-update Begin ------------------------
The ClamAV update process was started 3 time(s)
Last ClamAV update process started at Fri May 18 01:44:12 2012
Last Status:
main.cvd is up to date (version: 54, sigs: 1044387, f-level: 60, builder: sven)
Downloading daily-14929.cdiff [100%]
Downloading daily-14930.cdiff [100%]
Downloading daily-14931.cdiff [100%]
daily.cld updated (version: 14931, sigs: 174042, f-level: 63, builder: guitar)
bytecode.cld is up to date (version: 178, sigs: 40, f-level: 63, builder: neo)
[LibClamAV] Detected duplicate databases /var/clamav/main.cvd and /var/clamav/main.cld, please manually remove one of them
Database updated (1218469 signatures) from db.us.clamav.net (IP: xxx.xxx.xxx.xx)
Clamd successfully notified about the update.
---------------------- clam-update End -------------------------



After I repaired that issue, (basically just removed “aka rm’d” the older /var/clamav/main.cvd database) and I came across a slightly less important issue which was clamav was reporting an old version from the command line.

[root@serverT.com]  freshclam
ClamAV update process started at Tue May 20 11:00:07 2014
WARNING: Your ClamAV installation is OUTDATED!
WARNING: Local version: 0.98.3 Recommended version: 0.98.4
DON'T PANIC! Read http://www.clamav.net/support/faq
main.cvd is up to date (version: 55, sigs: 2424225, f-level: 60, builder: neo)
daily.cld is up to date (version: 19005, sigs: 958471, f-level: 63, builder: neo)
bytecode.cld is up to date (version: 237, sigs: 44, f-level: 63, builder: dgoddard)



Well, I read the FAQ which was somewhat ambiguous and started looking for other options to update this apart from cpanel – WHM 11.44.0 (build 18)



I was able to locate this set of instructions from an older version of clamav which worked very well.

cd /usr/local/cpanel/modules-install/clamavconnector-Linux-x86_64


wget http://kaz.dl.sourceforge.net/project/clamav/clamav/0.98.4/clamav-0.98.4.tar.gz


vim the 'install' file


AVV=0.98.4


Find the line AVVOLD=0.97.1 and make it AVVOLD=0.98.3

AVVOLD=0.98.3
:wq


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.98.4" > progversion


then run

./install
freshclam

No comments:

Post a Comment