Security

How to install ClamAV on CentOS 5 (RHEL 5)

ClamAV ClamAV is an open source antivirus widely used on Linux and Unix. It is a Free Anti virus that integrates well with various services and is very flexible to configure and use. A common example is a mail gateway scanner. Now that we have briefly covered the advantages of ClamAV, let us install it on CentOS 5. Installation is easy and requires only a little additional configuration. Installing ClamAV on CentOS 5 Add atrpms.repo to /etc/yum.repos.d using echo, as shown below.

[root@Ezylinux ~]# echo "[atrpms]
name=Red Hat Enterprise Linux $releasever - $basearch - ATrpms
failovermethod=priority
baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-atrpms

[atrpms-debuginfo]
name=Red Hat Enterprise Linux $releasever - $basearch - ATrpms - Debug
failovermethod=priority
baseurl=http://dl.atrpms.net/debug/el$releasever-$basearch/atrpms/stable
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-atrpms

[atrpms-source]
name=Red Hat Enterprise Linux $releasever - $basearch - ATrpms - Source
failovermethod=priority
baseurl=http://dl.atrpms.net/src/el$releasever-$basearch/atrpms/stable
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-atrpms" > /etc/yum.repos.d/atrpms.repo

Install ClamAV with the following command.

[root@Ezylinux ~]# yum install clamav
Loaded plugins: dellsysidplugin2, downloadonly, fastestmirror
Loading mirror speeds from cached hostfile
* addons: mirror.issp.co.th
* atrpms: dl.atrpms.net
* base: mirror.issp.co.th
* extras: mirror.issp.co.th
* rpmforge: apt.sw.be
* updates: mirror.issp.co.th
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package clamav.x86_64 1:0.97-57.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================================
Package Arch Version Repository Size
==========================================================================
Installing:
clamav x86_64 1:0.97-57.el5 atrpms 31 M

Transaction Summary
=========================================================================
Install 1 Package(s)
Upgrade 0 Package(s)

Total download size: 31 M
Is this ok [y/N]: y
Downloading Packages:
clamav-0.97-57.el5.x86_64 100% |=======================| 31 MB 03:03
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : clamav 1/1

Installed:
clamav.x86_64 1:0.97-57.el5

Complete!

After installation, update the database (signatures) with freshclam, as shown below.

[root@Ezylinux ~]# freshclam
ClamAV update process started at Wed Mar 2 12:18:54 2011
main.cvd is up to date (version: 53, sigs: 846214, f-level: 53, builder: sven)
WARNING: getfile: daily-12639.cdiff not found on remote server (IP: 193.1.193.64)
WARNING: getpatch: Can't download daily-12639.cdiff from database.clamav.net
WARNING: getfile: daily-12639.cdiff not found on remote server (IP: 130.59.10.36)
WARNING: getpatch: Can't download daily-12639.cdiff from database.clamav.net
WARNING: getpatch: Can't download daily-12639.cdiff from database.clamav.net
WARNING: Incremental update failed, trying to download daily.cvd
Downloading daily.cvd [100%]
daily.cvd updated (version: 12796, sigs: 61237, f-level: 60, builder: neo)
Downloading bytecode.cvd [100%]
bytecode.cvd updated (version: 140, sigs: 40, f-level: 58, builder: edwin)
Database updated (907491 signatures) from database.clamav.net (IP: 130.59.10.36)

That completes the ClamAV installation. What you do next depends on how you intend to use it.

EOF.← Back to articles

Archived comments (1)

Preserved from the original blog for reference.

Free Antivirus 2011

For Windows, see [Free Anti virus 2011](/รายชื่อ-antivirus-2011-free-จำหน่าย-antivirus/).