Меню Затваряне

Install Clam AntiVirus

Install Clam AntiVirus to protect your server from virus.
[1] Install Clamav.

root@debian:~# apt -y install clamav
root@debian:~# sed -i -e "s/^NotifyClamd/#NotifyClamd/g" /etc/clamav/freshclam.conf
root@debian:~# systemctl restart clamav-freshclam
[2] Try to scan.

root@debian:~# clamscan --infected --remove --recursive .

----------- SCAN SUMMARY -----------
Known viruses: 0
Engine version: 0.103.2
Scanned directories: 0
Scanned files: 0
Infected files: 0
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 0.003 sec (0 m 0 s)
Start Date: 2021:04:30 10:19:46
End Date:   2021:04:30 10:19:46
root@debian:~# clamscan --infected --remove --recursive .


# download test virus
root@debian:~# wget http://www.eicar.org/download/eicar.com

root@debian:~# clamscan --infected --remove --recursive .

/root/eicar.com: Win.Test.EICAR_HDB-1 FOUND
/root/eicar.com: Removed.

----------- SCAN SUMMARY -----------
Known viruses: 8524539
Engine version: 0.103.2
Scanned directories: 4
Scanned files: 3
Infected files: 1
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 24.225 sec (0 m 24 s)
Start Date: 2021:04:30 10:21:05
End Date:   2021:04:30 10:21:29
root@debian:~#