ClamAV install on windows

Kanishka Herath
Aeturnum
Published in
3 min readFeb 16, 2023

ClamAV is an open-source antivirus engine that can be installed on Windows, Linux, and Mac os. Here we learn how to install and configure it on Windows OS.

Let’s get started.

  1. Download the ClamAV.

You can download the latest stable version of ClamAV from the below link.
https://www.clamav.net/downloads

2. Install the ClamAV.

  • If you have downloaded the .msi version of the installation package, double-click on it and follow the instructions to install it.
  • If you have downloaded the .zip version of the installation package, unzip it into a directory of your windows machine.
    eg: C:\ClamAV

3. Configure the ClamAV.

Once you have installed ClamAV, navigate to the installation folder and find for conf_examples folder. You can see the clamd.conf.sample file and freshclam.conf.sample config file inside the conf_examples folder. Then copy those two files to the installation directory. (eg: C:\ClamAV)

  • Rename the clamd.conf.sample to clamd.conf
  • Rename freshclam.conf.sample to freshclam.conf

Modify clamd.conf

  • Open clamd.conf with a text editor.
  • Comment/Remove the word Example in line number 8. (If you have commented out it, it should look like #Example)
  • Find for #LogFile "C:\Program Files\ClamAV\clamd.log" line and remove the leading # in it to enable the logging. Also, correct the ClamAV installation path in it.
  • Find for TCPSocket 3310 and make sure it is not commented out.
    Also, find for TCPAddr localhost and make sure it is not commented out.
  • Save the file and exit.

Modify freshclam.conf

  • Open freshclam.conf with a text editor.
  • Comment/Remove the word Example in line number 8. (If you have commented out it, it should look like #Example)
  • Find for #UpdateLogFile "C:\Program Files\ClamAV\freshclam.log" line and remove the leading # in it to enable the logging. Also, correct the ClamAV installation path in it.
  • Find for #DatabaseDirectory "C:\Program Files\ClamAV\database" line and remove the leading # in it to enable the logging. Also, correct the ClamAV installation path in it.
  • Save the file and exit.

4. Install ClamAV as a windows service.

Open the Windows Command Prompt in Administrator Mode and navigate to the installation directory (eg: C:\ClamAV).

Run the following command to install as a service.
clamd.exe --install

5. Update the ClamAV database.

Open the Windows Command Prompt in Administrator Mode and navigate to the installation directory (eg: C:\ClamAV).

Run the following command to update the ClamAV database.
freshclam.exe

6. Running the ClamAV service.

Open the Windows Services (execute services.msc command in the run window to open the windows services) and start the ClamAV service,
Service name: ClamAV ClamD

Now the ClamAV service is up and running.

That’s all. Cheers ✌️

--

--