install from src ( REFERENCE )
configure error in raspbian
Raspbian has openssl by default, but I had a configure error as below.
$ wget http://www.clamav.net/downloads/production/clamav-0.98.7.tar.gz
$ tar -zxvf clamav-0.98.7.tar.gz
$ cd clamav-0.98.7/
$ ./configure
:
configure: unable to compile/link with check
checking for libxml2 installation... not found
configure: ****** libxml2 support unavailable
checking for OpenSSL installation... /usr
configure: error: OpenSSL not found.
$ which openssl
/usr/bin/openssl
$ /usr/bin/openssl version
OpenSSL 1.0.1k 8 Jan 2015
So, sudo apt-get install libssl-dev … SUCESS !!
$ sudo apt-get install libssl-dev
$ pwd
/home/endo/tmp/clamav-0.98.7
$ ./configure
$ make
$ make check
$ sudo make install
install from package, again
$ sudo apt-get install clamav
“apt-get install clamav” installs 4 commands.
“freshclam” updates virus database.
“clamscan” scan file or directories.
$ ls -l /usr/bin/*clam*
-rwxr-xr-x 1 root root 79872 Jun 7 01:40 /usr/bin/clambc
-rwxr-xr-x 1 root root 104352 Jun 7 01:40 /usr/bin/clamscan
-rwxr-xr-x 1 root root 79612 Jun 7 01:40 /usr/bin/clamsubmit
-rwxr-xr-x 1 root root 141408 Jun 7 01:40 /usr/bin/freshclam
“apt-get install clamav” starts virus db updater “clamscan”.
And “apt-get install clamav” adduser “clamav”
$ ps -ef | grep clam
clamav 1451 1 2 15:42 ? 00:00:02 /usr/bin/freshclam -d --foreground=true
Config file of freshclam exists in /etc/clamav/freshclam.conf
“apt-get install clamav” setup auto start
$ sudo insserv -s | grep clam
K:01:0 1 6:clamav-freshclam
S:02:2 3 4 5:clamav-freshclam
$ find /etc/ -name "*clamav-freshclam*"
/etc/init.d/clamav-freshclam
/etc/rc0.d/K01clamav-freshclam
/etc/rc1.d/K01clamav-freshclam
/etc/rc2.d/S02clamav-freshclam
/etc/rc3.d/S02clamav-freshclam
/etc/rc4.d/S02clamav-freshclam
/etc/rc5.d/S02clamav-freshclam
/etc/rc6.d/K01clamav-freshclam
/etc/network/if-down.d/clamav-freshclam-ifupdown
/etc/network/if-up.d/clamav-freshclam-ifupdown
/etc/ppp/ip-up.d/clamav-freshclam-ifupdown
/etc/ppp/ip-down.d/clamav-freshclam-ifupdown
“apt-get install clamav” setup logrotate.d
$ find /etc/ -name "*clamav-freshclam*"
:
/etc/logrotate.d/clamav-freshclam
scan test
getting sample virus file
$ wget http://www.eicar.org/download/eicar.com
$ wget http://www.eicar.org/download/eicar.com.txt
$ wget http://www.eicar.org/download/eicar_com.zip
$ wget http://www.eicar.org/download/eicarcom2.zip
scan test
$ /usr/bin/clamscan --infected --remove \
--recursive /home/endo/tmp/TEST_VIRUS
/home/endo/tmp/TEST_VIRUS/eicar_com.zip: Eicar-Test-Signature FOUND
/home/endo/tmp/TEST_VIRUS/eicar_com.zip: Removed.
/home/endo/tmp/TEST_VIRUS/eicar.com: Eicar-Test-Signature FOUND
/home/endo/tmp/TEST_VIRUS/eicar.com: Removed.
/home/endo/tmp/TEST_VIRUS/eicar.com.txt: Eicar-Test-Signature FOUND
/home/endo/tmp/TEST_VIRUS/eicar.com.txt: Removed.
/home/endo/tmp/TEST_VIRUS/eicarcom2.zip: Eicar-Test-Signature FOUND
/home/endo/tmp/TEST_VIRUS/eicarcom2.zip: Removed.
----------- SCAN SUMMARY -----------
Known viruses: 4113772
Engine version: 0.98.7
Scanned directories: 1
Scanned files: 4
Infected files: 4
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 173.278 sec (2 m 53 s)
clamscan needs long scan time …
So I un-installed clamav.
$ sudo apt-get --purge remove clamav*