Setting up the Clamav antivirus

Clamav is an open source antivirus tool. Its basic usage is for detecting viruses, malware, and malicious software on Linux-based machines.

To install Clamav, we need to install the EPEL repository:

$ sudo yum install epel-release

Then we can install Clamav with all its useful tools:

$ sudo yum install clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd

Before we start configuring, we need to make sure that SELinux will let Clamav work without issues:

$ sudo setsebool -P antivirus_can_scan_system 1

To check whether the option is active, we need to type this:

$ sudo getseboot –a | grep virus

Then we remove the example configuration, ...

Get Mastering CentOS 7 Linux Server now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.