Howto install and use ClamAV AntiVirus on Fedora 18

Howto install and use ClamAV AntiVirus on Fedora 18

install Clam AntiVirus Fedora 18

1. Install ClamAV by yum:

[root@fedora18 ~]# yum -y install clamav clamav-update
Loaded plugins: langpacks, presto, refresh-packagekit
fedora/18/i386/metalink | 8.1 kB 00:00
updates/18/i386/metalink | 4.1 kB 00:00
updates | 4.6 kB 00:00
updates/primary_db | 7.4 MB 00:29
updates/group_gz | 368 kB 00:01
Resolving Dependencies
–> Running transaction check
—> Package clamav.i686 0:0.97.7-1.fc18 will be installed
–> Processing Dependency: clamav-lib = 0.97.7-1.fc18 for package: clamav-0.97.7-1.fc18.i686
–> Processing Dependency: libclamav.so.6(CLAMAV_PUBLIC) for package: clamav-0.97.7-1.fc18.i686
–> Processing Dependency: libclamav.so.6(CLAMAV_PRIVATE) for package: clamav-0.97.7-1.fc18.i686
–> Processing Dependency: libclamav.so.6 for package: clamav-0.97.7-1.fc18.i686
–> Processing Dependency: data(clamav) for package: clamav-0.97.7-1.fc18.i686
—> Package clamav-update.i686 0:0.97.7-1.fc18 will be installed
–> Processing Dependency: clamav-filesystem = 0.97.7-1.fc18 for package: clamav-update-0.97.7-1.fc18.i686
–> Processing Dependency: group(clamupdate) for package: clamav-update-0.97.7-1.fc18.i686
–> Running transaction check
—> Package clamav-data-empty.noarch 0:0.97.7-1.fc18 will be installed
—> Package clamav-filesystem.noarch 0:0.97.7-1.fc18 will be installed
–> Processing Dependency: fedora-usermgmt for package: clamav-filesystem-0.97.7-1.fc18.noarch
–> Processing Dependency: fedora-usermgmt for package: clamav-filesystem-0.97.7-1.fc18.noarch
—> Package clamav-lib.i686 0:0.97.7-1.fc18 will be installed
–> Running transaction check
—> Package fedora-usermgmt.noarch 0:0.11-1408.fc18 will be installed
–> Processing Dependency: fedora-usermgmt-core = 0.11-1408.fc18 for package: fedora-usermgmt-0.11-1408.fc18.noarch
–> Processing Dependency: setup(fedora-usermgmt) for package: fedora-usermgmt-0.11-1408.fc18.noarch
–> Processing Dependency: instance(fedora-usermgmt) for package: fedora-usermgmt-0.11-1408.fc18.noarch
–> Running transaction check
—> Package fedora-usermgmt-core.noarch 0:0.11-1408.fc18 will be installed
—> Package fedora-usermgmt-default-fedora-setup.noarch 0:0.11-1408.fc18 will be installed
—> Package fedora-usermgmt-shadow-utils.noarch 0:0.11-1408.fc18 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository
Size
================================================================================
Installing:
clamav i686 0.97.7-1.fc18 updates 804 k
clamav-update i686 0.97.7-1.fc18 updates 82 k
Installing for dependencies:
clamav-data-empty noarch 0.97.7-1.fc18 updates 17 k
clamav-filesystem noarch 0.97.7-1.fc18 updates 17 k
clamav-lib i686 0.97.7-1.fc18 updates 3.7 M
fedora-usermgmt noarch 0.11-1408.fc18 fedora 9.1 k
fedora-usermgmt-core noarch 0.11-1408.fc18 fedora 10 k
fedora-usermgmt-default-fedora-setup noarch 0.11-1408.fc18 fedora 9.0 k
fedora-usermgmt-shadow-utils noarch 0.11-1408.fc18 fedora 10 k

Transaction Summary
================================================================================
Install 2 Packages (+7 Dependent packages)

Total download size: 4.6 M
Installed size: 67 M
Downloading Packages:
warning: /var/cache/yum/i386/18/updates/packages/clamav-update-0.97.7-1.fc18.i686.rpm: Header V3 RSA/SHA256 Signature, key ID de7f38bd: NOKEY
Public key for clamav-update-0.97.7-1.fc18.i686.rpm is not installed
(1/9): clamav-update-0.97.7-1.fc18.i686.rpm | 82 kB 00:01
(2/9): clamav-filesystem-0.97.7-1.fc18.noarch.rpm | 17 kB 00:01
Public key for fedora-usermgmt-0.11-1408.fc18.noarch.rpm is not installed40 ETA
(3/9): fedora-usermgmt-0.11-1408.fc18.noarch.rpm | 9.1 kB 00:01
(4/9): clamav-data-empty-0.97.7-1.fc18.noarch.rpm | 17 kB 00:03
(5/9): fedora-usermgmt-default-fedora-setup-0.11-1408.fc18 | 9.0 kB 00:00
(6/9): fedora-usermgmt-core-0.11-1408.fc18.noarch.rpm | 10 kB 00:02
(7/9): clamav-0.97.7-1.fc18.i686.rpm | 804 kB 00:06
(8/9): fedora-usermgmt-shadow-utils-0.11-1408.fc18.noarch. | 10 kB 00:03
(9/9): clamav-lib-0.97.7-1.fc18.i686.rpm | 3.7 MB 00:17
——————————————————————————–
Total 263 kB/s | 4.6 MB 00:18
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-i386
Importing GPG key 0xDE7F38BD:
Userid : “Fedora (18) <fedora@fedoraproject.org>”
Fingerprint: 7efb 8811 dd11 e380 b679 fced ff01 125c de7f 38bd
Package : fedora-release-18-1.noarch (@anaconda)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-i386
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : clamav-data-empty-0.97.7-1.fc18.noarch 1/9
Installing : fedora-usermgmt-default-fedora-setup-0.11-1408.fc18.noarch 2/9
Installing : fedora-usermgmt-core-0.11-1408.fc18.noarch 3/9
Installing : fedora-usermgmt-shadow-utils-0.11-1408.fc18.noarch 4/9
Installing : fedora-usermgmt-0.11-1408.fc18.noarch 5/9
Installing : clamav-lib-0.97.7-1.fc18.i686 6/9
Installing : clamav-filesystem-0.97.7-1.fc18.noarch 7/9
Installing : clamav-update-0.97.7-1.fc18.i686 8/9
Installing : clamav-0.97.7-1.fc18.i686 9/9
Verifying : clamav-lib-0.97.7-1.fc18.i686 1/9
Verifying : fedora-usermgmt-0.11-1408.fc18.noarch 2/9
Verifying : clamav-0.97.7-1.fc18.i686 3/9
Verifying : fedora-usermgmt-shadow-utils-0.11-1408.fc18.noarch 4/9
Verifying : fedora-usermgmt-core-0.11-1408.fc18.noarch 5/9
Verifying : clamav-filesystem-0.97.7-1.fc18.noarch 6/9
Verifying : clamav-data-empty-0.97.7-1.fc18.noarch 7/9
Verifying : clamav-update-0.97.7-1.fc18.i686 8/9
Verifying : fedora-usermgmt-default-fedora-setup-0.11-1408.fc18.noarch 9/9

Installed:
clamav.i686 0:0.97.7-1.fc18 clamav-update.i686 0:0.97.7-1.fc18

Dependency Installed:
clamav-data-empty.noarch 0:0.97.7-1.fc18
clamav-filesystem.noarch 0:0.97.7-1.fc18
clamav-lib.i686 0:0.97.7-1.fc18
fedora-usermgmt.noarch 0:0.11-1408.fc18
fedora-usermgmt-core.noarch 0:0.11-1408.fc18
fedora-usermgmt-default-fedora-setup.noarch 0:0.11-1408.fc18
fedora-usermgmt-shadow-utils.noarch 0:0.11-1408.fc18

Complete!

2. Edit clamav config file:

[root@fedora18 ~]# vi /etc/freshclam.conf
##
## Example config file for freshclam
## Please read the freshclam.conf(5) manual before editing this file.
##
# Comment or remove the line below.
#Example  #make it comment

# Path to the database directory.
# WARNING: It must match clamd.conf’s directive!
# Default: hardcoded (depends on installation options)
#DatabaseDirectory /var/lib/clamav

# Path to the log file (make sure it has proper permissions)
# Default: disabled
#UpdateLogFile /var/log/freshclam.log

# Maximum size of the log file.
# Value of 0 disables the limit.
# You may use ‘M’ or ‘m’ for megabytes (1M = 1m = 1048576 bytes)
# and ‘K’ or ‘k’ for kilobytes (1K = 1k = 1024 bytes).
# in bytes just don’t use modifiers.
# Default: 1M
#LogFileMaxSize 2M

# Log time with each message.
# Default: no
#LogTime yes

# Enable verbose logging.
# Default: no
#LogVerbose yes

# Use system logger (can work together with UpdateLogFile).
# Default: no
LogSyslog yes

# Specify the type of syslog messages – please refer to ‘man syslog’
# for facility names.
# Default: LOG_LOCAL6
#LogFacility LOG_MAIL

3. Update Clam AntiVirus:

[root@fedora18 ~]# freshclam
ClamAV update process started at Wed Apr 24 13:54:51 2013
WARNING: Your ClamAV installation is OUTDATED!
WARNING: Local version: 0.97.7 Recommended version: 0.97.8
DON’T PANIC! Read http://www.clamav.net/support/faq
Downloading main.cvd [100%]
main.cvd updated (version: 54, sigs: 1044387, f-level: 60, builder: sven)
Downloading daily.cvd [100%]
daily.cvd updated (version: 17080, sigs: 1147771, f-level: 63, builder: neo)
Downloading bytecode.cvd [100%]
bytecode.cvd updated (version: 214, sigs: 41, f-level: 63, builder: neo)
Database updated (2192199 signatures) from database.clamav.net (IP: 27.96.54.66)

4. Try to scan:

[root@fedora18 ~]# clamscan –infected –remove –recursive .

———– SCAN SUMMARY ———–
Known viruses: 2186789
Engine version: 0.97.7
Scanned directories: 13
Scanned files: 11
Infected files: 0
Data scanned: 0.01 MB
Data read: 0.00 MB (ratio 2.00:1)
Time: 13.341 sec (0 m 13 s)

5. Download trial virus for testing:

[root@fedora18 ~]# wget http://www.eicar.org/download/eicar_com.zip
–2013-04-24 14:06:40– http://www.eicar.org/download/eicar_com.zip
Resolving www.eicar.org (www.eicar.org)… 188.40.238.250
Connecting to www.eicar.org (www.eicar.org)|188.40.238.250|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 184 [application/octet-stream]
Saving to: âeicar_com.zipâ

100%[==============================================================================================================================>] 184 –.-K/s in 0s

2013-04-24 14:06:40 (4.90 MB/s) – âeicar_com.zipâ saved [184/184]

6. Try to scan again:

[root@fedora18 ~]# clamscan –infected –remove –recursive .
./eicar_com.zip: Eicar-Test-Signature FOUND
./eicar_com.zip: Removed.

———– SCAN SUMMARY ———–
Known viruses: 2186789
Engine version: 0.97.7
Scanned directories: 13
Scanned files: 12
Infected files: 1
Data scanned: 0.01 MB
Data read: 0.00 MB (ratio 2.00:1)
Time: 10.045 sec (0 m 10 s)

Now our Anti Virus work perfectly

That’s all. Thanks for using ithelpblog.com

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>