ClamAV Installation Guide

         ClamAV is the most popular antivirus software on the Linux platform. As free and open-source software, ClamAV supports multiple platforms, including Linux/Unix, MAC OS X, Windows, and OpenVMS.

1. Installation and Configuration

useradd clamav       # Add user
wget http://mirror.cnop.net/security/clamav-0.99.2.tar.gz
tar zxvf clamav-0.99.2.tar.gz
cd clamav-0.99.2
./configure –prefix=/usr/local/clamav  –disable-clamav
make & make install


 

whereis clamav     # Check if the installation is successful

Configuration:

mkdir /usr/local/clamav/logs      (Log directory)
touch /usr/local/clamav/logs/clamd.log
touch /usr/local/clamav/logs/freshclam.log
mkdir /usr/local/clamav/updata   (ClamAV virus database directory)
chown  -R clamav.clamav /usr/local/clamav/
chown -R clamav.clamav /usr/local/clamav/updata/
chown clamav.clamav /usr/local/clamav/logs/clamd.log
chown clamav.clamav /usr/local/clamav/logs/freshclam.log

cd /usr/local/clamav/etc
cp clamd.conf.sample clamd.conf
cp freshclam.conf.sample freshclam.conf
vim clamd.conf
#Example    Comment out this line.
LogFile /usr/local/clamav/logs/clamd.log   
PidFile /usr/local/clamav/updata/clamd.pid    
DatabaseDirectory /usr/local/clamav/updata

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim freshclam.conf

#Example    Comment out this line. 
DatabaseDirectory /usr/local/clamav/updata
UpdateLogFile /usr/local/clamav/logs/freshclam.log
PidFile /usr/local/clamav/updata/freshclam.pid

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Update Virus Database

/usr/local/clamav/bin/freshclam

2. Usage

/usr/local/clamav/bin/clamscan -r /home/jjzb/vol1/tomee      # Scan the directory recursively

Leave a Comment

Your email address will not be published.