Greeting,
This article describes how to install ClamAV in CentOS 5 via SSH.
First be sure this article for
x86_64.
Now log in to ssh :
Code:
wget http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
Code:
rpm -Uvh rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
open /etc/yum.repos.d/rpmforge.repo via nano,pico as you like
Code:
nano /etc/yum.repos.d/rpmforge.repo
change enabled 1 to enabled 0
now we will install clamav via yum :
Code:
yum -y --enablerepo=rpmforge install clamd
Out put:
HTML Code:
==================================================================================================================================================================================
Package Arch Version Repository Size
==================================================================================================================================================================================
Installing:
clamd x86_64 0.96.5-1.el5.rf rpmforge 240 k
Installing for dependencies:
clamav x86_64 0.96.5-1.el5.rf rpmforge 2.3 M
clamav-db x86_64 0.96.5-1.el5.rf rpmforge 25 M
Transaction Summary
==================================================================================================================================================================================
Install 3 Package(s)
Upgrade 0 Package(s)
Total download size: 28 M
Downloading Packages:
(1/3): clamd-0.96.5-1.el5.rf.x86_64.rpm | 240 kB 00:00
(2/3): clamav-0.96.5-1.el5.rf.x86_64.rpm | 2.3 MB 00:01
(3/3): clamav-db-0.96.5-1.el5.rf.x86_64.rpm | 25 MB 00:09
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 2.1 MB/s | 28 MB 00:13
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : clamav-db 1/3
Installing : clamav 2/3
Installing : clamd 3/3
Installed:
clamd.x86_64 0:0.96.5-1.el5.rf
Dependency Installed:
clamav.x86_64 0:0.96.5-1.el5.rf clamav-db.x86_64 0:0.96.5-1.el5.rf
Complete!
Now start to clamav :
Code:
/etc/rc.d/init.d/clamd start
chkconfig clamd on
you will see :
HTML Code:
Starting Clam AntiVirus Daemon: LibClamAV Warning: **************************************************
LibClamAV Warning: *** The virus database is older than 7 days! ***
LibClamAV Warning: *** Please update it as soon as possible. ***
LibClamAV Warning: **************************************************
now update calnav DB :
Code:
chkconfig --list clamd
sed -i 's/Example/#Example/g' /etc/freshclam.conf
freshclam
now restart calmav :
Code:
/etc/rc.d/init.d/clamd restart
out put:
HTML Code:
Stopping Clam AntiVirus Daemon: [ OK ]
Starting Clam AntiVirus Daemon: [ OK ]
no warning
ClamAV Installed Successfully
for full system scan use this command:
Code:
clamscan --infected --remove --recursive /
for full home scan use this command:
Code:
clamscan --infected --remove --recursive /home
for scanning user account use this command:
Code:
clamscan --infected --remove --recursive /home/user
Change
user to user you need scan it like MHafez
command to be :
Code:
clamscan --infected --remove --recursive /home/MHafez
I hope you Enjoy
