how to secure your centos with clamav

clamav

clamav centos

how to install clamAV on centos 5 and centos 6. What and function Clam AntiVirus (ClamAV) is a free, cross-platform antivirus software tool-kit able to detect many types of malicious software, including viruses. One of its main uses is on mail servers as a server-side email virus scanner. if you need best free antivirus for linux centos you can use this one. you can easy protect your linux centos and make safe than before. if you need work how to scan virus with clamav you can read documentation or learn here. also if you dont like this antivirus you canuninstall Clamav (not recommended because not save Operating system without antivirus)

ClamAV uses freshclam to update the virus definitions. They are automatically updated with the /etc/cron.daily/freshclam cron script. No actions need to be taken. You can verify that your updates are being completed by looking at your /var/log/clamav/freshclam.log log file.

if you need easy how to install clamav for linux centos you and add epel repo and use yum command to install clamav.
CentOS 6 – 32-bit

rpm -Uvh http://mirror.overthewire.com.au/pub/epel/6/i386/epel-release-6-7.noarch.rpm

CentOS 6 – 64-bit

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm

CentOS 5 – 32-bit

rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

CentOS 5 – 64-bit

rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

now after you enable epel repo, you can update first your software this is good option, use command :

yum update -y

then try Install clamav to your linux centos from epel repo :

yum install clamav clamd --enablerepo=epel

thats all, you have clamav on your linux system, but we need auto start, if you reboot your linux centos then clamav will automaticly running, use command :

/etc/init.d/clamd on
chkconfig clamd on
/etc/init.d/clamd start
tutorial centos

Update ClamAV’s signatures

/usr/bin/freshclam

ClamAV will update automatically, as part of /etc/cron.daily/freshclam

exampele if i have webserver and want make save on webdirectory like /var/www/html then i need cronjob to scan the /var/www/html directory every day:
you may need Create cron file:

vim /etc/cron.daily/manual_clamscan

Add the following to the file above. Be sure to change SCAN_DIR to the directory that you want to scan:

#!/bin/bash
SCAN_DIR="/var/www/html"
LOG_FILE="/var/log/clamav/manual_clamscan.log"
/usr/bin/clamscan -i -r $SCAN_DIR >> $LOG_FILE

make this cron script executable permissions:

chmod +x /etc/cron.daily/manual_clamscan

You can even run the above script to ensure that it works correctly.

you see this is not difficulty, scan file linux centos with clamav. if you worry have trojan, viruses or malware.

after you know tutorial how to install clamav on linux centos 5 or 6 you may want to know how to uninstall clamav from linux centos. this simple, if you before have this one and install clamav manual build and configure you need read again this tutorial from above.

1. add epel repo first (if you dont have this one)

2. use command :

yum remove clamav clamd --enablerepo=epel

2. install or upgrade clamav software (if you

if dont work you may try reinstall or upgrade first you clamav.

Comments are closed.

Post Navigation