分类: LINUX
2008-07-07 10:14:37
Squid ClamAV & HAVP
1. Download clamAV from the website , the fedora binarys can be found at . once they have been downloaded then install all of them.
clamav-0.87.1-2.i386.rpm
clamav-db-0.87.1-2.i386.rpm
clamav-devel-0.87.1-2.i386.rpm
clamav-milter-0.87.1-2.i386.rpm
clamav-server-0.87.1-2.i386.rpm
rpm -ivh clamav-*
2. Add the user havp 'useradd havp' and switch to that user 'su havp' .
3. Now download havp from this website and extract it
gzip -d havp-0.74.tar.gz
tar -xf havp-0.74.tar
4. Then install it using clamav as your virus filter
configure --with-scanner=libclamav
make
make install
5. Once it is installed copy the configuration files into the /etc/ section
cd sourcetohavp/havp/etc
cp -r havp /etc/
6. Now edit the configuation file to your settings
vi /usr/local/etc/havp/havp.config
7. Now we need to mount the directory with mandatory looks
mount /dev/hda9 /var/tmp/havp -o mand
8. Now we need to set all the permissions, so change the root user.
chown -R havp:havp /var/tmp/havp/
chmod ug+rwx -R /var/tmp/havp/
chown -R havp:havp /etc/havp/
chmod ug+rwx -R /etc/havp/
chown -R havp:havp /var/log/havp/
chmod ug+rwx -R /var/log/havp/
9. Once clamav and HAVP have been setup we need to setup squid to run with HAVP. edit the squid.conf file and add the following line
nano /etc/squid/squid.conf
cache_peer 127.0.0.1 parent 8000 0 no-query no-digest no-netdb-exchange default |
10. Now we need to start/restart all the services
/etc/init.d/havp start
/etc/init.d/clamd start
/etc/init.d/squid restart