Sunday 9 March 2014

ubuntu Youtube caching with SQUID 2.7 [using storeurl.pl]

Following web sites are tested and working good :)
First update UBUNTU and install some support tools for squid compilation by
1
2
apt-get update
apt-get install -y gcc build-essential sharutils ccze libzip-dev automake1.9
.
Now we have to download and compile SQUID 2.7 STABLE9

1
2
3
4
5
mkdir /temp
cd /temp
tar xvf squid-2.7.STABLE9+patch.tar.gz
cd squid-2.7.STABLE9

Now we have to compile SQUID , You can add/remove your required configure options.
1
2
3
4
5
./configure --prefix=/usr --exec_prefix=/usr --bindir=/usr/sbin --sbindir=/usr/sbin --libexecdir=/usr/lib/squid --sysconfdir=/etc/squid \
--localstatedir=/var/spool/squid --datadir=/usr/share/squid --enable-async-io=24 --with-aufs-threads=24 --with-pthreads --enable-storeio=aufs \
--enable-linux-netfilter --enable-arp-acl --enable-epoll --enable-removal-policies=heap,lru --with-aio --with-dl --enable-snmp \
--enable-delay-pools --enable-htcp --enable-cache-digests --disable-unlinkd --enable-large-cache-files --with-large-files \
--enable-err-languages=English --enable-default-err-language=English --with-maxfd=65536
Or if you want 64bit, try below
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
./configure \
--prefix=/usr \
--exec_prefix=/usr \
--bindir=/usr/sbin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib/squid \
--sysconfdir=/etc/squid \
--localstatedir=/var/spool/squid \
--datadir=/usr/share/squid \
--enable-async-io=24 \
--with-aufs-threads=24 \
--with-pthreads \
--enable-storeio=aufs \
--enable-linux-netfilter \
--enable-arp-acl \
--enable-epoll \
--enable-removal-policies=heap,lru \
--with-aio --with-dl \
--enable-snmp \
--enable-delay-pools \
--enable-htcp \
--enable-cache-digests \
--disable-unlinkd \
--enable-large-cache-files \
--with-large-files \
--enable-err-languages=English \
--enable-default-err-language=English --with-maxfd=65536 \
--enable-carp \
--enable-follow-x-forwarded-for \
--with-maxfd=65536  \
'amd64-debian-linux' 'build_alias=amd64-debian-linux' 'host_alias=amd64-debian-linux' 'target_alias=amd64-debian-linux' 'CFLAGS=-Wall -g -O2' 'LDFLAGS=-Wl,-Bsymbolic-functions' 'CPPFLAGS='
Now issue make and make install commands
Now issue make and make install commands
[To understand what configure, make and make install does, read following,
http://www.codecoffee.com/tipsforlinux/articles/27.html]
1
2
make
make install
Create Log folders (if not exists) and assign write permissions to proxy user
1
2
mkdir /var/log/squid
chown proxy:proxy /var/log/squid

Now its time to Edit squid configuration files. open Squid Configuration file by
1
nano /etc/squid/squid.conf
.
Remove all previous lines , means empty the file, and paste all following lines . . .


No comments:

Post a Comment