How to Installing Squid with zph patch
Written by Dianse H   

Zph (Zero Penalty Hits) for improvement squid ability installed on my Linux Box (Slackware).  It's used when we're need to change TOS for HIT cache on our squid server.

Tested and working properly on Slackware 12.0 using Squid-2.6Stable16

What about my steps? Here there are :

 

1. Download Squid and zph patch, Extract, Patching, and install.

        root@dianseh# tar -zxvf squid-2.6.STABLE16.tar.gz
        root@dianseh# tar -zxvf squid-2.6.16-ToS_Hit_ToS_Preserve.patch
        root@dianseh# cd squid-2.6.STABLE16
        root@dianseh# patch -p1 < ../squid-2.6.16-ToS_Hit_ToS_Preserve.patch
        root@dianseh# ./configure --prefix=/usr/local/squid –-enable-async-io=24 \
                –-with-aufs-threads=24 –-with-pthreads -–with-aio \
                -–enable-storeio=aufs,diskd –-enable-icmp \
                -–enable-removal-policies=heap –-disable-wccp \
                -–enable-delay-pools -–enable-linux-netfilter \
                -–enable-default-err-languages=English \
                -–enable-err-languages=English –-disable-ident-lookups \
                -–enable-cache-digests -–enable-underscores \
                -–disable-hostname-checks
        root@dianseh# make all && make install

2. Edit your own squid.conf or can dowload at here

   --- insert this line ---
     zph_tos_local 0x10
    note : this is make Squid change HIT cache to TOS 0x10 

3. Do't forget create log and caches directory eg. /var/log/squid/

    root@dianseh# mkdir -p /var/log/squid /cache1 /cache2
    root@dianseh# touch /var/log/squid/access.log
    root@dianseh# touch /var/log/squid/cache.log
    root@dianseh# chow -R nobody:nobody /var/log/squid /cache1 /cache2

4. Build cache.

    root@dianseh# /usr/local/squid/sbin/squid -z 

5. Start squid.

    root@dianseh# /usr/local/squid/sbin/squid -DY

6. Done, happy surfing

 

Good Luck!

 

References :

1. Squid Cache
2. Zph Patch
3. Google