CentOS 7
Ads

Clam AntiVirus
2014/09/25
 
Install Clam AntiVirus to protect servers from virus.
[1] Install Clamav.
# install from EPEL

[root@dlp ~]#
yum --enablerepo=epel -y install clamav clamav-update
[root@dlp ~]#
sed -i -e "s/^Example/#Example/" /etc/freshclam.conf
# update pattern files

[root@dlp ~]#
freshclam

ClamAV update process started at Fri Aug 29 22:03:30 2014
main.cld is up to date (version: 55, sigs: 2424225, f-level: 60, builder: neo)
daily.cvd is up to date (version: 19314, sigs: 1094505, f-level: 63, builder: neo)
bytecode.cvd is up to date (version: 242, sigs: 46, f-level: 63, builder: dgoddard)
[2] Try to scan.
[root@dlp ~]#
clamscan --infected --remove --recursive /home
----------- SCAN SUMMARY -----------
Known viruses: 3575245
Engine version: 0.98.4
Scanned directories: 2
Scanned files: 3
Infected files: 0
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 10.369 sec (0 m 10 s)

# download trial virus

[root@dlp ~]#
curl -O http://www.eicar.org/download/eicar.com
[root@dlp ~]#
clamscan --infected --remove --recursive .

./eicar.com: Eicar-Test-Signature FOUND
./eicar.com: Removed.
# just detected
----------- SCAN SUMMARY -----------
Known viruses: 3575245
Engine version: 0.98.4
Scanned directories: 3
Scanned files: 10
Infected files: 1
Data scanned: 0.00 MB
Data read: 256.57 MB (ratio 0.00:1)
Time: 10.307 sec (0 m 10 s)
 
Tweet