How to install and setup squid on freebsd February 6th, 2010
Web Server IP Address –> 192.168.0.1
Public IP address (The Address that Squid will listen on to handle web requests) –> 10.10.10.10
web Server FQDN name —> http://linax.wordpress.com
# cd /usr/local/src/
# wget http://www.squid-cache.org/Versions/v2/2.7/squid-2.7.STABLE6.tar.bz2
# tar -jxf squid-2.7.STABLE6.tar.bz2
# cd squid-2.7.STABLE6/
# ./configure --prefix=/opt/squid2.7 --disable-internal-dns \
--enable-forward-log --enable-follow-x-forwarded-for --enable-snmp \
--enable-linux-netfilter --enable-http-violations --enable-delay-pools \
--enable-storeio=diskd,aufs,ufs,coss --with-coss-membuf-size=8388608 --with-large-files \
--enable-large-cache-files --with-maxfd=8192 --enable-async-io=64 \
--enable-removal-policies=lru,heap --enable-useragent-log --enable-referer-log \
--enable-err-languages=English --enable-default-err-language=English
# make && make install
# cd /opt/squid2.7/etc/
# cp squid.conf{,-bak}
here is my squid.conf : Read the rest of this entry »
Posted in feebsd, Networking | 1 Comment »
Setting Up Squid on FreeBSD February 5th, 2010
Squid is web caching and conserving badwidth application. With Squid, we will reduce the traffic 30% or more from normal usage (without squid) and enhance respone time. In here, i will use squid 2.7.STABLE3.
Installing Squid.
You can download Squid from here. After you download the source of squid, then :
# tar zxvf squid-2.7.STABLE3.tar.gz
# cd squid-2.7.STABLE3
# ./configure ‘–sysconfdir=/etc/squid’ ‘–enable-storeio=diskd,ufs,aufs’ ‘–enable-delay-pools’ \
‘–enable-pf-transparent’ ‘–enable-ipf-transparent’ ‘–disable-ident-lookups’ \
‘–enable-removal-policies’
# make
# make install
–enable-delay-pools – Enable delay pools to limit bandwidth usage.
You need to enable the option in order to use Squid to limit bandwith usage. It will give fair bandwith usage for everybody. In my case, I don’t want one person sucking all of the available bandwidth by downloading a big movie, causing others to suffer.
–enable-ipf-transparent – Enable Transparent Proxy support for systems using IP Filter network address redirection.
With this option, you don’t have to configure the client’s browser proxy setting. Also it is a good way to force the client to use the proxy everytime.
–enable-storeio=diskd,ufs – Enable diskd
Improve disk I/O performance. According to the Squid FAQ, if you enable diskd you can gain a 400% increase of perfomance. However, you would need to recompile the kernel because your operating system must support message queues and shared memory.
–enable-removal-policies – Build support for the list of removal policies.
By default, Squid uses LRU, but there are two better policies: GDSF and LFUDA. See the Squid config for a more detailed explanation.
–disable-ident-lookups – This allows you to remove code that performs Ident (RFC 931) lookups.
Not really important. By the way, if you do transparent proxy, ident lookups won’t work.
–enable-snmp
Optional: enable this and you can monitor Squid with mrtg or rrdtool. How to do this is outside of this article’s scope. Perhaps in my next one. Read the rest of this entry »
