ccihosting.com
Have questions? Call us.
Panama: (+507) 264.0852

Installing ClamAv

CCIHosting.com knowledgebase

Knowledgebase

How to install ClamAV on CentOS

This document will guide you through the installation of ClamAV on CentOS.

ClamAV is an open source (GPL) antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats on Linux.

Install ClamAV

  1. Install EPEL repo

    Before we can do proceed, you must ensure that you have the EPEL yum repository enabled.

    yum install epel-release -y
  2. Install required ClamAV packages yum install clamav clamd
  3. Start the clamd service and set it to auto-start
    /etc/init.d/clamd on chkconfig clamd on /etc/init.d/clamd start
  4. Update ClamAV’s signatures
    /usr/bin/freshclam

    Note: ClamAV will update automatically, as part of /etc/cron.daily/freshclam.

Configure Daily Scan

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

  1. Create cron file:vim /etc/cron.daily/manual_clamscan
  2. Add the following to the file above. Be sure to change SCAN_DIR to the directory that you want to scan: #!/bin/bash SCAN_DIR="/home" LOG_FILE="/var/log/clamav/manual_clamscan.log" /usr/bin/clamscan -i -r $SCAN_DIR >> $LOG_FILE
  3. Give our cron script executable permissions: chmod +x /etc/cron.daily/manual_clamscan

    You can even run the above script to ensure that it works correctly.

Need a Web Hosting account?

Web Hosting

$ 6/month
Starting at

View Plans

  • Instant Activation
  • DDoS Protection
  • 24x7 Tech Support
  • Bitcoin Accepted

VPS

$ 15/month
Starting at

View Plans

  • Instant Activation
  • DDoS Protection
  • 24x7 Tech Support
  • Bitcoin Accepted

Cloud Servers

$ 35/month
Starting at

View Plans

  • Instant Activation
  • DDoS Protection
  • 24x7 Tech Support
  • Bitcoin Accepted

Dedicated Servers

$ 90/month
Starting at

View Plans

  • 48 Hours or Less
  • DDoS Protection
  • 24x7 Tech Support
  • Bitcoin Accepted
paypal
visa
mastercard
bitcoin

Need assistance choosing your right server? We are here to help

Call our sales team at +(507) 264.0852 or talk with us on Live Chat