Clamav on CentOS

in

Official clamav RPMS for FC8 are cheesy and broken while Dag's RPMs for EL4 are outdated,so I created mine based on the latest clamav-0.96.tar.gz clamav distribution.Either download binary RPMS for EL4/x64 clamav-0.94-vit02-x86_64-rpms.tgz or obtain source RPM clamav-0.94-vit02.el4.src.rpm and rebuild it.

Install RPMS:

rpm -i clamav-0.94-vit02.el4.x86_64.rpm
       clamav-data-empty-0.94-vit02.el4.x86_64.rpm
       clamav-server-0.94-vit02.el4.x86_64.rpm
       clamav-update-0.94-vit02.el4.x86_64.rpm

If needed, configure proxy for freshclam in /etc/freshclam.conf

HTTPProxyServer proxy.ourdom.com
HTTPProxyPort 3128

Either download main.cvd and daily.cvd from download page and install them in /var/lib/clamav, or run the automatic update script

/etc/cron.daily/freshclam

Run the clamav service

chkconfig clamd on
service clamd restart

Perform a unit test: run antivirus for /home/public/anti

clamscan -r /home/public/anti
clamdscan /home/public/anti

and verify that it prints a message like

/home/public/anti/eicar.com: Eicar-Test-Signature FOUND

Normally the clamav daemon runs as user clamav and group clamav. In the meantime CGP usually runs as user root and group mailsand maintains mail files with corresponding permissions. For clamav to have read access to the mail queue, we add the clamav user to the mail  group and command clamd  to use secondary groups.

  • Edit /etc/group and add clamav to the list of mail group users
  • Uncomment line AllowSupplementaryGroups yes in /etc/clamd.conf
  • Restart the clamd service

Attachments

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
To prevent automated spam submissions leave this field empty.