Breaking News
Loading...
25 January 2014

squid Caching Youtube with storeurl.pl Method (100% Working in 2014)

 configuration.
Install Ubuntu 13.10, 12.xx

Install Squid

apt-get update
 apt-get install ccze -y
apt-get install vim mc make gcc g++


Download squid dan configuration dari http://www.4shared.com/zip/bVgqjNQY/squid_n_shorewall_conf.html. 

 copy kan hasil downloand ke /usr/local


cd /usr/local
unzip squid_n_shorewall_conf.zip
tar zxvf squid-2.7.STABLE9PATCH.tar.gz
cd squid-2.7.STABLE9
./configure --prefix=/usr   --exec-prefix=/usr   --bindir=/usr/sbin   --sbindir=/usr/sbin   --sysconfdir=/etc/squid   --datadir=/usr/share/squid   --includedir=/usr/include   --libdir=/usr/lib   --libexecdir=/usr/lib/squid   --localstatedir=/var   --sharedstatedir=/usr/com   --mandir=/usr/share/man   --infodir=/usr/share/info   --x-includes=/usr/include   --x-libraries=/usr/lib   --enable-shared=yes   --enable-static=no   --enable-carp    --enable-storeio=aufs,ufs   --enable-removal-policies=heap,lru   --disable-icmp   --disable-delay-pools   --disable-esi   --enable-icap-client   --enable-useragent-log   --enable-referer-log   --disable-wccp   --enable-wccpv2   --disable-kill-parent-hack   --enable-snmp   --enable-cachemgr-hostname=localhost   --enable-arp-acl   --disable-htcp  --disable-forw-via-db   --disable-follow-x-forwarded-for   --enable-cache-digests    --disable-poll   --enable-epoll   --enable-linux-netfilter   --disable-ident-lookups   --enable-default-hostsfile=/etc/hosts    --with-default-user=squid   --with-large-files  --enable-mit=/usr   --with-logdir=/var/log/squid   --enable-http-violations   --enable-zph-qos   --with-filedescriptors=65536   --enable-gnuregex --enable-async-io=64 --with-aufs-threads=64  --with-pthreads --with-aio  --enable-default-err-languages=English --enable-err-languages=English --disable-hostname-checks --enable-underscores
make; make install
steps berikut nya
cd /usr/local/
mv storeurl.pl /etc/squid/
mv squid.conf /etc/squid/
mv squid /etc/init.d/
chmod 755 /etc/init.d/squid
chmod 755  /etc/squid/storeurl.pl
mkdir /cache
chown proxy:proxy /cache
mkdir /var/log/squid
touch /var/log/squid/access.log
touch /var/log/squid/cache.log
chown -Rf proxy:proxy /var/log/squid
update-rc.d squid defaults
squid -z
service squid restart
Selanjut nya, install shorewall.
Install Shorewall.
cd /usr/local/
wget http://www.shorewall.com.au/CURRENT_STABLE_VERSION_IS_4.5/shorewall-4.5.21/shorewall-4.5.21.5.tgz
wget http://www.shorewall.com.au/CURRENT_STABLE_VERSION_IS_4.5/shorewall-4.5.21/shorewall-core-4.5.21.5.tgz
tar zxvf shorewall-core-4.5.21.5.tgz
tar zxvf shorewall-4.5.21.5.tgz
cd shorewall-core-4.5.21.5
./configure
./install.sh
cd ..
cd shorewall-4.5.21.5
./configure
./install.sh
   contoh copy dari downloand
http://www.4shared.com/zip/bVgqjNQY/squid_n_shorewall_conf.html
cp /usr/local/shorewallconf/* /etc/shorewall/
update-rc.d shorewall defaults

tambahkan code2 berikut sebelum exit 0 

iptables -t nat -A POSTROUTING -o eth0 -s 192.168.1.0/24 -j MASQUERADE
iptables --table nat -A PREROUTING -s 192.168.1.0/24 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports   3128

3 komentar:

  1. gx bisa gan..youtubenya..
    youtubenya kaga ke cache

    ReplyDelete
  2. tambahkan code2 berikut sebelum exit 0

    iptables -t nat -A POSTROUTING -o eth0 -s 192.168.1.0/24 -j MASQUERADE
    iptables --table nat -A PREROUTING -s 192.168.1.0/24 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128

    Ini maksudnya apa gan? file mana harus dimasukkan?
    Thanks,

    ReplyDelete
  3. NeoBux is a very recommended work from home site.

    ReplyDelete

 
Toggle Footer