Ubuntu 21.04
Sponsored Link

Install Clam AntiVirus
2021/04/29
 
Install Clam AntiVirus to protect server from virus.
[1] Install Clamav.
root@dlp:~#
apt -y install clamav
root@dlp:~#
sed -i -e "s/^NotifyClamd/#NotifyClamd/g" /etc/clamav/freshclam.conf

root@dlp:~#
systemctl stop clamav-freshclam
# update pattern files manually

root@dlp:~#
freshclam

Thu Apr 28 19:11:00 2021 -> ClamAV update process started at Thu Apr 29 19:11:00 2021
Thu Apr 28 19:11:00 2021 -> daily.cvd database is up-to-date (version: 26154, sigs: 3974700, f-level: 63, builder: raynman)
Thu Apr 28 19:11:00 2021 -> main.cvd database is up-to-date (version: 59, sigs: 4564902, f-level: 60, builder: sigmgr)
Thu Apr 28 19:11:00 2021 -> bytecode.cvd database is up-to-date (version: 333, sigs: 92, f-level: 63, builder: awillia2)

root@dlp:~#
systemctl start clamav-freshclam
[2] Try to scan.
root@dlp:~#
clamscan --infected --remove --recursive /home


----------- SCAN SUMMARY -----------
Known viruses: 8524328
Engine version: 0.103.2
Scanned directories: 3
Scanned files: 4
Infected files: 0
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 18.007 sec (0 m 18 s)
Start Date: 2021:04:28 19:11:41
End Date:   2021:04:28 19:11:59

# download test virus

root@dlp:~#
wget http://www.eicar.org/download/eicar.com
root@dlp:~#
clamscan --infected --remove --recursive ./

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

----------- SCAN SUMMARY -----------
Known viruses: 8524328
Engine version: 0.103.2
Scanned directories: 8
Scanned files: 6
Infected files: 1
Data scanned: 0.01 MB
Data read: 0.00 MB (ratio 2.00:1)
Time: 17.215 sec (0 m 17 s)
Start Date: 2021:04:28 19:12:40
End Date:   2021:04:28 19:12:58
Matched Content