Skip to main content

Install And Enable Anti-Virus Software

Clamav installation

Preparation for ClamAV installation

  1. Ensure that the EPEL repository has been installed
yum -y install epel-release

yum clean all

ClamAV installation

  1. Run the command below to install ClamAV
yum -y install clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd

Configuring ClamAV

  1. Remove "Example" string from the configuration file

    sed -i -e "s/^Example/#Example/" /etc/clamd.d/scan.conf

  2. Edit scan.conf
Open scan.conf for editing
==========================

vi /etc/clamd.d/scan.conf

Look for and the change line from
=================================

#LocalSocket /var/run/clamd.scan/clamd.sock

to

LocalSocket /var/run/clamd.scan/clamd.sock

Configure FreshClam

  1. Remove "Example" string from ClamAV’s freshclam update engine configuration file

    sed -i -e "s/^Example/#Example/" /etc/freshclam.conf

  2. Run the virus definition database update

    freshclam

Start and enable Clamd services

  1. Use the following commands to start and enable Clamd services
systemctl start clamd@scan

systemctl enable clamd@scan