You Are Here: Home » Operating System » -BSD » [SERVER] Setting Lusca Dynamic Content on Freebsd

[SERVER] Setting Lusca Dynamic Content on Freebsd

How To : Proxy Server using Lusca Dynamic Content on Freebsd
Pada tutorial kali ini saya akan membahas bagaimana menginstal proxy server lusca pada mesin freebsd. Lusca sendiri merupakan turunan dari squid 2. yang dikembangkan oleh adrian chadd, salah satu fitur utama yang dimiliki lusca adalah menyimpan cache dynamic content dari situs – situs seperti youtube, 4 shared dan banyak lainnya dan tidak dimiliki oleh squid proxy server.
Baiklah, disini saya harap anda telah menginstal sebuah mesin server menggunakan os freebsd.

cd /tmp
setenv PACKAGESITE http://ftp.itb.ac.id/pub/FreeBSD/ports/amd64/packages-8.2-release/Latest/
pkg_add -rv perl
rehash
fetch http://metrohauslocalserver.googlecode.com/files/LUSCA_HEAD.tar.bz2
tar xzvf LUSCA_HEAD.tar.bz2
cd LUSCA_HEAD-r14809/

Compile Lusca:

make clean
./configure -prefix=/usr -exec-prefix=/usr -bindir=/usr/sbin -sbindir=/usr/sbin -libexecdir=/usr/libexec/squid -sysconfdir=/usr/local/etc/squid -localstatedir=/var/log/squid -datadir=/usr/share/squid -enable-async-io=24 -with-aufs-threads=24 -with-pthreads -enable-storeio=aufs,coss,null -disable-linux-netfilter -enable-kqueue -enable-arp-acl -disable-linux-tproxy -disable-epoll -enable-removal-policies=heap -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 make && make install
rehash

Buat partisi cache untuk proxy lusca

zfs create -o compression=gzip-9 -o atime=off tank/root/cache-1
zfs create -o compression=gzip-9 -o atime=off tank/root/cache-2

Buat file log proxy dan set permisionnya

touch /var/log/squid/access.log
touch /var/log/squid/cache.log

chown -R proxy:proxy /var/log/squid/*
chown -R proxy:proxy /cache-*

Download file pendukung:

cd /tmp
fetch http://metrohauslocalserver.googlecode.com/files/squid.sh
fetch http://metrohauslocalserver.googlecode.com/files/squid.conf
fetch http://metrohauslocalserver.googlecode.com/files/storeurl.pl
fetch http://metrohauslocalserver.googlecode.com/files/refresh.conf
mv squid.conf /usr/local/etc/
mv refresh.conf /usr/local/etc/
mv storeurl.pl /usr/share/squid
mv squid.sh /usr/local/etc/rc.d/

Edit squid.conf sesuai kebutuhan jaringan anda

chmod +x /usr/share/squid/storeurl.pl
chmod +x /usr/local/etc/rc.d/squid.sh

squid -z <===== membuat swap squid
squid -k parse <==== cek konfig squid
squid -DF <==== perintah menjalankan squid atau

/usr/local/etc/rc.d/squid.sh start
ps -ax |grep squid <—<< perintah untuk melihat berjalan atau tidaknya squid

Final Test. Silahkan anda test lusca proxy server anda dengan mengarahkan ip dan port proxy di browser kesayangan anda ataupun membuat ip forward agar squid berjalan transparan.
Selamat Mencoba 😀

About The Author

harrychanputra.web.id

Number of Entries : 295

Leave a Comment

© 2011 Powered By Wordpress, Goodnews Theme By Geeks Docuementation

Scroll to top