How To Install ClamAV on CentOS 6

Install ClamAV on CentOS 6

In this tutorial, we will show you how to install and configuration of ClamAV on your CentOS 6. For those of you who didn’t know, ClamAV is an open-source (GPL) antivirus engine designed for detecting viruses, malware, and other malicious threats on Linux.  It’s easy to use and best for Linux based Web & Mail server. In this article, I will show you through the step by step installation of ClamAV on CentOS 6.x from the source.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you through the step by step installation ClamAV on a CentOS 6

Install ClamAV on CentOS 6

Step 1. First, add yum repository your system.

The EPEL repo is enabled by simply installing an RPM. Please use the command below to install the EPEL repository on your CentOS server.

Step 2. Install required ClamAV packages.

Step 3. Start the clamd service on system boot.

Update ClamAV’s signatures:

Step 4. Configuring daily scan.

In this example, I will configure a cronjob to scan the /home/ directory every day:

Add the following piece of code into the clamav_scan file.

Give our cron script executable permissions:

Congratulations! You have successfully installed ClamAV. Thanks for using this tutorial for installing ClamAV in CentOS 6 system. For additional help or useful information, we recommend you to check the official ClamAV web site.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!