SquidGuard is a URL redirector used to use blacklists with the proxysoftware Squid. There are two big advantages to squidguard: it is fast and it is free.
ClamAV
Primary tabs
Credits
Various bits of code, scripts, and procedures were put together with information from John Simpson's qmail.jms1.net website. It's an excellent resource on managing and setting up a Qmail server.
Prerequisites
In order to verifty the digital signature of the virus database, install gmp-devel
yum -y install gmp-develInstallation
Create a user and group for ClamAV to run as:
groupadd clamav
useradd -g clamav -s /bin/false -c "Clam AntiVirus" clamavDownload the latest version (0.99 at time of writing):
cd /extra/src
wget http://downloads.sourceforge.net/clamav/clamav-0.99.tar.gz
tar zxf clamav-0.99.tar.gz
cd clamav-0.99
./configure
make
make installCreate and chown the /usr/local/share/clamav directory:
mkdir /usr/local/share/clamav
chown clamav:clamav /usr/local/share/clamavConfiguration
Copy the sample configuration files:
cp /usr/local/etc/clamd.conf.sample /usr/local/etc/clamd.conf
cp /usr/local/etc/freshclam.conf.sample /usr/local/etc/freshclam.confBefore starting up clamd, we'll need to edit /usr/local/etc/clamd.conf with a few options:
#Example
#LogFile
LogSyslog no
FixStaleSocket yes
Foreground yes
PidFile /var/run/clamd.pid
LocalSocket /tmp/clamd.socketWe also need to edit /usr/local/etc/freshclam.conf before it will run under daemontools:
#Example
#UpdateLogFile
LogSyslog no
Foreground yesdaemontools startup
Rather than using init.d scripts, we'll use daemontools to manage running clamd. Create the directories to hold the services:
mkdir -m 1755 /var/service/clamav
mkdir -m 755 /var/service/clamav/logThen set up the service and log scripts:
cd /var/service/clamav
echo '#!/bin/sh' > run
echo 'exec 2>&1' >> run
echo 'exec clamd' >> run
chmod 755 run
cd log
wget http://qmail.jms1.net/scripts/service-any-log-run
mv service-any-log-run run
chmod 755 runRepeat the procedure for freshclam:
mkdir -m 1755 /var/service/freshclam
mkdir -m 755 /var/service/freshclam/log
cd /var/service/freshclam
echo '#!/bin/sh' > run
echo 'exec 2>&1' >> run
echo 'exec freshclam -d --stdout' >> run
chmod 755 run
cd log
wget http://qmail.jms1.net/scripts/service-any-log-run
mv service-any-log-run run
chmod 755 runCreate the symbolic links in /service to start clamd and freshclam:
ln -s /var/service/clamav /service/
ln -s /var/service/freshclam /service/After about 10 seconds, confirm they are running:
svstat /service/clamav /service/freshclamUninstalling ClamAV
Remove the symbolic link in /service and then stop the clamav daemontools service:
cd /service/clamav
rm /service/clamav
svc -dx . logThen stop the freshclam daemontools service:
cd /service/freshclam
rm /service/freshclam
svc -dx . logGo into the source, assuming you still have it, and uninstall it:
cd /extra/src/clamav-0.98.7
./configure
make uninstallMake sure that you haven’t got old libraries (libclamav.so) lying around your filesystem. You can verify it using:
ldd `which freshclam`Also make sure there is really only one version of ClamAV installed on your system:
whereis freshclam
whereis clamscan- Log in to post comments