How to install and enable ClamAV

***** Note ***** Technical support for ClamAV is very limited. Use at your own risk.

To install ClamAV:

  1. Install the binaries:
cd /usr/local/directadmin/custombuild
./build update
./build set clamav yes
./build clamav
1
2
3
4
  1. Restart Exim:
service exim restart
1

Review the related optional scriptopen in new window to ensure it's running.

If you see this error:

Starting freshclam: ERROR: This tool requires libclamav with functionality level 63 or higher (current f-level: 62)
1

Then see this guideopen in new window on the forum.

LibClamAV Error: cli_loaddb(): No supported database files found

If you get the following error when trying to start ClamAV:

# service clamd start
Starting clamd: LibClamAV Error: cli_loaddb(): No supported database files found in /usr/share/clamav
ERROR: Can't open file or directory
                                                          [FAILED]
1
2
3
4

Or another related error:

LibClamAV Error: cl_load(): Can't get status of /usr/share/clamav
1

You can rebuild the database by using these commands:

cd /usr/share
mkdir -p clamav
chown clamav:clamav clamav
freshclam -v
1
2
3
4

How to completely uninstall ClamAV

To remove ClamAV and all related checks, completely disable checks first:

cd /usr/local/directadmin/custombuild
./build set clamav no
./build set clamav_exim no
./build set proftpd_uploadscan no
./build set pureftpd_uploadscan no
./build set suhosin_php_uploadscan no
./build set modsecurity_uploadscan no
1
2
3
4
5
6
7

Then remove the service:

./build remove_clamav
1

And rebuild related services:

./build exim_conf
./build proftpd
./build clean
./build php_ini
./build rewrite_confs
1
2
3
4
5
Last Updated: 6/23/2021, 9:36:08 PM