Web Hosting Talk







View Full Version : Install Squid


Scott.Mc
06-27-2006, 08:28 AM
Let's install squid and then later configure it as an anonymous proxy.

Login as root and execute,



cd /usr/local/src
wget http://www.squid-cache.org/Versions/v2/2.5/squid-2.5.STABLE14.tar.gz
tar -zxvf squid-2.5.STABLE14.tar.gz
cd squid-2.5.STABLE14
./configure --prefix=/usr/local/squid --disable-ident-lookups
make all
make install




Now lets add the user squid, create the cache directory and then set permissions.



useradd -d /usr/local/squid/cache/ -r -s /dev/null squid >/dev/null 2>&1
mkdir /usr/local/squid/cache
chown -R squid:squid /usr/local/squid/cache
chown -R squid:squid /usr/local/squid
chmod -R 755 /usr/local/squid/cache




You will now have to generate the cache files,


sudo -u squid /usr/local/squid/sbin/squid -z



Now lets change the cache effective user and group to squid.


perl -pi -e 's/# cache_effective_user nobody/cache_effective_user squid\ncache_effective_group squid/g' /usr/local/squid/etc/squid.conf



That's us complete, all we have to do now is start squid,


/usr/local/squid/sbin/squid



Squid should now be installed and running, all that's left is to Configure Squid (http://www.hostgeekz.com/guides/Other/69/Configure_Squid.htm)

-Scott