If you’re currently using mail server on vps or cloud server you should be installed anti virus and anti spam as well to protect your mail server from any attack. That’s way ClamAC come to protect your mail server from any spam or junk emails. So, what’s actually ClamAV?

For newbie like you on the web hosting industries, you may only know ClamAV is run on Windows operating system. But, ClamaV is also available on Linux distros as an open source and completely free antivirus engine which everyone can use it. Well, ClamAV can detect any trojans, malwares, virures, and other malicious content.

It can also be using to scan malware or combined it with another paid malware scanner software like ISPprotect for example. ClamAV can also be joined with another malware scanner engine, including Linux Malware Detect. Usually ClamAV is standard antivirus engine for mail server, which always used on cPanel-WHM. Also, ClamAV supports scanning on multiple file formats, archive unpacking, and multiple signature languages.

However, what’s I don’like on ClamAV that is usually using more server resource, including RAM and vCPU. Since, ClamAV is high-performance and powerfull multi-threaded scanner aplication, so I strongly recomend you to install ClamAV on server with minimum 2GB RAM and 4 vCPU.

Well, on this today guide I will teach you on how to deploying ClamAV daemon on virtual private server. Simply take your time for a moment or you must at leats have relax time to perform installation.

PREREQUISITES:
* Cloud Server with Debian/Ubuntu Linux
* Server IPv4 Address
* Full Root Access
* gNome Terminal for Linux
* PuTTy SSH client for Windows/Mac

* PLEASE NOTE: On this tutorial I’m using Debian 10 (Buster) running on Oracle Virtual Box

1.) Install ClamAV and ClamAV Daemon

Step one, update your system and then install clamav and clamav-daemon.

$ apt update && sudo apt upgrade

The, run the following command to install both software.

$ apt-get install clamav clamav-daemon -y

After that start clamav-daemon

$ service clamav-daemon start

2.) Update ClamAV Virus Definition

After that we must update ClamAV virus definition in order to gets new viruses signatures from ClamAV server

Stop freshclam first

$ /etc/init.d/clamav-freshclam stop

To update viruses definition, run the following command.

$ freshclam

After that, start freshclam again

$ /etc/init.d/clamav-freshclam start

3.) Let’s Run ClamAV Scanner

Simply run the following command to scan directory and files on your server.

$ clamscan -r /path/to/your_directory/

4.) Restart Clamav

As for restart ClamAV simply run the following commands.

$ systemctl start clamav-daemon
$ systemctl start clamav-freshclam

CONCLUSIONS:

Installing and configuring ClamAV antivirus on vps or cloud serveris quite easy, you just have relax time to perform this installation procedure. This method can also be apllied on dedicated or colocation servers.

Previous articleHow To Fix *Error* The path to iptables is either not set or incorrect for IPTABLES [/sbin/ip6tables]
Next articleInstalling & Configuring MultiPHP-FPM Version on Debian 9 (Stretch)
I'm just an freelancer and part-time worker at several freelance sites. Here at knot35.com we will share everything knowledge about Linux, Unix-Like, and open-source softwares.

LEAVE A REPLY

Please enter your comment!
Please enter your name here