Installing ClamAV

Installing from source

  • Check Requirements
  • Uninstall any old version, see UninstallClamAV (Note: this isn’t essential, but removes sources of problems).
  • wget the source gzip file, see Which Version
  • untar the source to an appropriate location. Note that most modern versions of tar will automatically ungzip for you.
  • ensure you have a user clamav and group clamav.
    • If you’re using a different group/user you must specify that using the –with-user and/or –with-group option when you run configure
  • Configure the build:
    • for clamav-milter support ./configure –enable-milter
    • to support new features ./configure –enable-experimental
    • otherwise ./configure
  • run make
  • if you did not uninstall the previous version, stop any running services.
  • as root, run “make install” to install the binaries
  • it is recommended that you run ldconfig as root after installing
  • restart any relevant services.
  • Run freshclam manually, to ensure your AV definitions are up to date.



  • C compiler
  • zlib library

Note: you must compile with a shared library, use: make clean ; ./configure -s before make when building zlib

Installing From Packages

Installing your distribution’s packages is the easiest route. It will make also upgrades easier.

Understand which packages you need

You don’t necessarily need all packages. Please read ClamOverview carefully to understand which ones you need.

Operating System Specific Information


# apt-get update

# apt-get install clamav


On CentOS:

# yum install -y epel-release

# yum install -y clamav

On Community Enterprise Operating System (CentOS) the clamav package requires the Extra Packages for Enterprise Linux (EPEL) repository.

On RedHat Enterprise Linux (RHEL) the EPEL release package has to be installed either manually or through RHN.


# yum install -y clamav clamav-update


# urpmi clamav clamd


# emerge clamav

See package entry on Portage.


# zypper install -y clamav

FreeBSD, OpenBSD, NetBSD  

Use the ports Luke.


Multiple groups have packaged ClamAV for Solaris. The installation method differs for each.

Would you like to download the latest virus pattern definitions during installation?

(This requires that you have a direct connection to the Internet. If you are behind a proxy server then skip this step.)

Update virus patterns? (y/n): y

 ## Processing package information.
 ## Processing system information.
 ## Verifying package dependencies.
 ## Verifying disk space requirements.
 ## Checking for conflicts with packages already installed.
 ## Checking for setuid/setgid programs.

This package contains scripts which will be executed with super-user
permission during the process of installing this package.

Do you want to continue with the installation of <ClamAV> [y,n,?] y

Installing ClamAV 0.92 as <ClamAV>

 ## Executing preinstall script.
Creating group clamav...
Creating user clamav...
 ## Installing part 1 of 1.
/opt/ClamAV/lib/ <symbolic link>
/opt/ClamAV/lib/ <symbolic link>
/opt/ClamAV/lib/ <symbolic link>
/opt/ClamAV/lib/ <symbolic link>
/opt/ClamAV/lib/ <symbolic link>
/opt/ClamAV/lib/ <symbolic link>

[ verifying class <none> ]

Executing postinstall script:

svccfg: Taking "initial" snapshot for svc:/network/clamav:default.
svccfg: Taking "last-import" snapshot for svc:/network/clamav:default.
svccfg: Refreshed svc:/network/clamav:default.
svccfg: Refreshed svc:/milestone/multi-user:default.
svccfg: Successful import.

 *** Downloading latest virus pattern definitions.

Current working dir is /opt/ClamAV/share/clamav
Max retries == 3
ClamAV update process started at Sun Dec 30 20:03:53 2007
TTL: 300
Software version from DNS: 0.92
main.cvd version from DNS: 45
main.cvd is up to date (version: 45, sigs: 169676, f-level: 21, builder: sven)
daily.cvd version from DNS: 5297
Trying to download (IP:
Downloading daily.cvd [100%]
Removing incremental directory
Removing backup directory ./clamav-a1b9834acd3a8a1360172186199f917d updated (version: 5297, sigs: 14304, f-level: 21, builder: ccordes)
Database updated (183980 signatures) from (IP:

Installation is complete.

You should now review the following configuration files and customise
them for your environment.


and then the daemons can be started with

svcadm enable clamav

For assistance with this package, please email
in the first instance. For general assistance with ClamAV, see 

Installation of <ClamAV> was successful.

Verify that the ClamAV service has been installed into the SMF database (Solaris 10 only)

# svcs clamav
STATE          STIME    FMRI
disabled       20:06:24 svc:/network/clamav:default
Test the command line scanner

 # /opt/ClamAV/bin/clamscan /tmp/ClamAV-s10-0.92 
/tmp/ClamAV-s10-0.92: OK

----------- SCAN SUMMARY -----------
Known viruses: 183980
Engine version: 0.92
Scanned directories: 0
Scanned files: 1
Infected files: 0
Data scanned: 19.48 MB
Time: 13.060 sec (0 m 13 s)
Configure the daemon scanner and updater

Edit the two configuration files in /opt/ClamAV/etc to suit your installation then start the ClamAV services.

# svcadm enable clamav

Instructions courtesy of Andy Fiddaman - 30 Dec 2007

Solaris packages from OpenCSW

OpenCSW is a community software project for Solaris 8+ on both Sparc and x86. It packages more than 2000 popular open source titles and they can all easily be installed with dependency handling via pkgutil which is modeled after Debian’s apt-get.

# pkgutil -i clamav

More info on OpenCSW

Slackware provides third-party precompiled packages for Slackware. You can find them with this search query on that site.

Martijn Dekker provides packages there that provide complete and semi-automatic integration with ClamAV’s stock Sendmail package.


Various Installation Guides for OSX can be found on the Internet, two that we have seen are: * *

How to use

Download the package, and as root, install it like so (substituting the appropriate filename):

# installpkg clamav-0.91.2-i486-1McD.tgz

To activate Sendmail integration, after installing the package, copy the ‘/usr/share/sendmail/’ file into ‘/etc/mail/’:

# cp /usr/share/sendmail/ /etc/mail/

Then start ClamAV and restart Sendmail:

# /etc/rc.d/rc.clamav start

# /etc/rc.d/rc.sendmail restart

Building your own

You may wish to build your own package if I haven’t uploaded one with the most recent version yet, if you use a pre-11.0 Slackware version (at the time of this writing, I build on 11.0, 12.0 and 12.1, and my binaries may not work on earlier versions), if you don’t trust third-party binaries, or simply because you’re a complete geek ;-) . You can download my easy-to-use Slackbuild script, from which the fully-integrated ClamAV packages at are generated.

This script can be used to build a ClamAV package for Slackware 10.0 or higher with Sendmail installed (as Sendmail milter support was introduced as of 10.0). To choose a version of ClamAV to build, you can ‘cd’ to the script’s directory and invoke the script like so:

$ VERSION=1.23.4 ./clamav.SlackBuild

…substituting, of course, the appropriate ClamAV version for ‘1.23.4’. Note: there is no need to be root to use this build script; it will ask for your root password after building the binaries and just before creating the package (and if you have fakeroot installed, even that isn’t necessary).


First update Windows

  • Microsoft Update

Available packages

clamAV.msi - base package for clamav, an anti-virus utility for Windows

How to install

  • simple mode: doubleclick the MSI installer package
  • command line (displays only a confirmation dialog at the end): msiexec /i clamAV.msi /qr


Microsoft .net version 2.0 is required starting with ClamAV 0.92.1


The ClamAV for OpenVMS port is maintained by Alexey Chupahin, Mibok Ltd

Please visit Clamav OpenVMS project site

First, you should download latest clamav sources and bzip2 library (if you need bz2 archives support) from the site above. Install process is very similar to one in unix:




This process provides for you:

  • ClamAV library
  • clamscan
  • freshclam
  • clamd
  • clamdscan
  • clamconf
  • scripts, allow you to start clamd and freshclam in daemon mode