Install ClamAV cPanel Servers

Installing ClamAV cPanel server via WHM grahpical

  1. Login to WHM (Control Panel) as the root user
  2. Navigate to: Home » cPanel » Manage Plugins
  3. Select ClamAV tick the Install and keep updated box
  4. Click on Save
Install ClamAV Cpanel
Install ClamAV Cpanel

Installing ClamAV via Command Line (SSH)

This command tells the system that we want ClamAV to be listed as installed by the local RPM system:

/scripts/update_local_rpm_versions --edit target_settings.clamav installed

This command is the one responsible for installing the ClamAV RPM on your server:

/scripts/check_cpanel_rpms --fix --targets=clamav

Creating Symbolic Links

If you need manually scan or use via ssh, so we dont need remember url paths:

ln -s /usr/local/cpanel/3rdparty/bin/clamscan /usr/local/bin/clamscan
ln -s /usr/local/cpanel/3rdparty/bin/freshclam /usr/local/bin/freshclam

ClamAV Cpanel Malware Signatures

Also we add extra ClamAV signatures better ratio detect php malware on server.

Edit Freshclam.conf file:

# /usr/local/cpanel/3rdparty/etc/freshclam.conf

Add these line end of file:

DatabaseCustomURL http://cdn.malware.expert/malware.expert.ndb
DatabaseCustomURL http://cdn.malware.expert/malware.expert.hdb
DatabaseCustomURL http://cdn.malware.expert/malware.expert.ldb
DatabaseCustomURL http://cdn.malware.expert/malware.expert.fp

Restart Freshclam

# /usr/local/cpanel/3rdparty/bin/freshclam restart