Installation sur CentOS 5 de Squid 3 + SquidGuard + SquidClamAV
Dans le cadre d’une étude et mise en place d’un proxy Squid avec un filtrage des pages demandées par SquidGuard et analyse du flux en continu par ClamAV, je vous donne la procédure à suivre sans rentrer dans les détails et je n’expliquerai pas les configurations.
Cet article n’a pour seul objectif que de poser les bases pour votre projet.
Dans un premier temps, on doit installer Squid, mais on doit d’abord sous une Centos 5 mettre à jour le GCC.
Mise à jour du GCC :
wget ftp://ftp.ntua.gr/pub/linux/scientificlinux/57/i386/SL/gcc44-4.4.4-13.el5.i386.rpm wget ftp://ftp.ntua.gr/pub/linux/scientificlinux/57/i386/SL/gcc44-c++-4.4.4-13.el5.i386.rpm wget ftp://ftp.ntua.gr/pub/linux/scientificlinux/57/i386/SL/libstdc++44-devel-4.4.4-13.el5.i386.rpm wget ftp://ftp.ntua.gr/pub/linux/scientificlinux/56/x86_64/SL/libgomp-4.4.4-13.el5.i386.rpm rpm -e libgomp-4.4.0-6.el5 gcc-4.1.2-48.el5.i386 gcc-c++-4.1.2-48.el5.i386 gcc-gfortran-4.1.2-48.el5.i386 systemtap-1.1-3.el5.i386 rpm -ivh gcc44*.rpm libstdc++44-devel*.rpm libgomp*.rpm cd /usr/bin ln -s g++44 g++ ln -s gcc44 gcc
Compile/installation de Squid :
wget http://www.squid-cache.org/Versions/v3/3.2/squid-3.2.7.tar.bz2 tar xjvf squid-3.2.7.tar.bz2 cd squid-3.2.7 ./configure make make install
Ensuite, on s’attaque à SquidGuard, avec son prérequis BerkeleyDB en 4.6.
Compile/installation de BerkeleyDB 4.6 :
wget http://pkgs.fedoraproject.org/repo/pkgs/compat-db/db-4.6.21.tar.gz/718082e7e35fc48478a2334b0bc4cd11/db-4.6.21.tar.gz cd db-4.6.21/ ./configure make make install cd /usr/local/ ln -s BerkeleyDB.4.6 BerkeleyDB echo "/usr/local/BerkeleyDB/lib" >> /etc/ld.so.conf ldconfig
Compile/installation de SquidGuard :
wget http://www.squidguard.org/Downloads/squidGuard-1.4.tar.gz tar xzvf squidGuard-1.4.tar.gz cd squidGuard-1.4/ ./configure make make install
Premier blacklist :
cd /usr/local/squidGuard/db wget ftp://ftp.univ-tlse1.fr/pub/reseau/cache/squidguard_contrib/blacklists.tar.gz tar xzf blacklists.tar.gz
Enfin, pour analyser le flux en continu, on installe SquidClamAV. Il faut bien entendu que ClamAV soit installé et on ne va pas détailler cette installation.
Compile/installation de c_icap:
wget http://downloads.sourceforge.net/project/squidclamav/squidclamav/6.10/squidclamav-6.10.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fsquidclamav%2Ffiles%2Flatest%2Fdownload&ts=1359728807&use_mirror=heanet tar xjvf squidclamav-6.10.tar.gz ./configure make make installwget http://downloads.sourceforge.net/project/c-icap/c-icap/0.2.x/c_icap-0.2.5.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fc-icap%2Ffiles%2Fc-icap%2F0.2.x%2Fc_icap-0.2.5.tar.gz%2Fdownload&ts=1359975785&use_mirror=switch tar xzvf c_icap-0.2.5.tar.gz cd c_icap-0.2.5 ./configure make make install
Compile/installation de SquidClamAV:
wget http://downloads.sourceforge.net/project/squidclamav/squidclamav/6.10/squidclamav-6.10.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fsquidclamav%2Ffiles%2Flatest%2Fdownload&ts=1359728807&use_mirror=heanet tar xjvf squidclamav-6.10.tar.gz ./configure make make install
Voilà, c’est fini! Il vous reste la configuration (assez simple), tester la charge de votre serveur et la maintenance/sauvegarde de votre nouveau service.