📞 🇺🇸 +1 361 304 4309 📞 🇮🇳 +91 76769 02281 ✉️ [email protected]
Security & Hardening

How to Set Up ClamAV Antivirus on Linux Server

How to Set Up ClamAV Antivirus on Linux Server

ClamAV is the most widely-used open-source antivirus for Linux servers — especially important for web servers that receive user uploads.

Install and Update

sudo apt install clamav clamav-daemon -y
sudo systemctl stop clamav-freshclam
sudo freshclam
sudo systemctl start clamav-freshclam clamav-daemon

Manual Scan

clamscan -r /var/www --infected --remove --log=/var/log/clamav/scan.log

Automated Daily Scanning

#!/bin/bash
LOG=/var/log/clamav/daily-$(date +%Y%m%d).log
clamscan -r /var/www --infected --log=$LOG --quiet
INFECTED=$(grep "Infected files:" $LOG | awk '{print $3}')
if [ "$INFECTED" != "0" ]; then
    mail -s "ClamAV: $INFECTED infected on $(hostname)" [email protected] < $LOG
fi

Conclusion

ClamAV provides essential malware protection for web servers. Our team configures complete server security including antivirus scanning.

#clamav #antivirus #linux #malware
Share:
🛠️ Need Expert Help?

Don't want to do this yourself?

Our certified engineers implement this for you — correctly, securely, and within hours. Available 24/7 with 15-minute emergency response.

  • ✅ 19+ years experience
  • ✅ 60+ certified engineers
  • ✅ 1,600+ servers managed
  • ✅ 40+ countries served
  • ✅ Plans from $49/mo

Get Expert Help — Free Consultation

We respond within 4 hours · No commitment required

Please enter your name and a valid email.

No spam. Privacy Policy

Comments