ClamAV is an open-source antivirus software toolkit able to detect many types of malicious software, including viruses. It is especially effective for scanning emails on mail gateways.
To install ClamAV on a Linux server, you can use the package manager for your distribution. For example, on Debian-based systems:
sudo apt-get update
sudo apt-get install clamav clamav-daemon
For Red Hat-based systems:
sudo yum install epel-release
sudo yum install clamav clamav-update
Before running a scan, ensure that your virus database is up to date:
sudo freshclam
To perform a scan on a directory, use the following command:
clamscan -r /path/to/directory
For real-time scanning, you can use clamd
:
sudo systemctl start clamd
ClamAV configuration files are typically located in /etc/clamav/
. The main configuration file is clamd.conf
. You can customize various settings such as the directories to scan, the types of files to include or exclude, and the logging options.
ClamAV is a powerful tool for maintaining the security of your Linux server by providing robust antivirus protection.