Adding ClamAV to RedHat Linux Hosts
Installing ClamAV on Red Hat Enterprise Linux (RHEL) Overview This knowledge article explains how to install ClamAV antivirus software on Red Hat Enterprise Linux systems. ClamAV is an open-source antivirus engine designed for detecting trojans, viruses, malware, and other malicious threats. DuploCloud has default ClamAV association for Linux/Unix hosts but not for Red Hat Enterprise Linux. For RHEL systems, you will need to follow the manual installation approach outlined in this document. Prerequisites Red Hat Enterprise Linux system Root or sudo privileges Internet connection to download packages Installation Steps
Install EPEL Repository ClamAV is available through the EPEL (Extra Packages for Enterprise Linux) repository. First, install the EPEL repository: sudo yum install -y epel-release
Install ClamAV and Required Packages After enabling EPEL, install ClamAV, clamd (the ClamAV daemon), and cpulimit (to control CPU usage during scans): sudo yum install -y clamav clamd cpulimit
Start the Freshclam Service Start the freshclam service to download and update virus definitions: sudo service clamav-freshclam start If the above command doesn't work, try using systemctl instead: sudo systemctl start clamav-freshclam
Set Up Automated Scanning Download and install the ClamAV cron script for automated scanning: sudo wget -O installclamavcron.sh https://raw.githubusercontent.com/duplocloud/compliance/master/installclamavcron.sh sudo chmod 0755 installclamavcron.sh sudo ./installclamavcron.sh Verification Verify that ClamAV is properly installed by checking:
Package Installation sudo yum list installed | grep clamav sudo yum list installed | grep cpulimit
Cron Job Installation ls -la /etc/cron.daily | grep clamscan_daily_v2
Service Status sudo service clamav-freshclam status or sudo systemctl status clamav-freshclam
Last updated
Was this helpful?

