Monday, July 2, 2012

Install Lusca Proxy Server in FreeBSD 9


proxy# pkg_add -rv perl subversion autotools squidstats ccze
Let the server finish the package installation, once the installation completed, let’s download the script update-lusca.sh to use the latest version of Lusca that available through SVN trunks. But if you would like to use the stable version, just skip this step.
proxy# svn checkout http://lusca-cache.googlecode.com/svn/branches/LUSCA_HEAD/ lusca-cache-read-only
Checked out revision 14942
proxy# cd lusca-cache-read-only
proxy# fetch http://simplyeko.com/newlusca/update-lusca.sh
proxy# chmod +x update-lusca.sh
proxy# ee update-lusca.sh
find the line below
WORKDIR=/root/lusca
RELVER=r14942
#RELVER=$1
Change RELVER value with the latest version number after you run “svn checkout” like the command above. If you find the higher version as per article , please change the value RELVER. Afterward, let’s run update-lusca script than continue to compile the Lusca.
—-
proxy# ./update-lusca.sh
proxy# cd /root/lusca/LUSCA-HEAD-rr14942

proxy# ./configure --bindir=/usr/local/sbin --sbindir=/usr/local/sbin --datadir=/usr/local/etc/squid --libexecdir=/usr/local/libexec/squid --localstatedir=/usr/local/squid --sysconfdir=/usr/local/etc/squid --enable-removal-policies=heap --disable-linux-netfilter --enable-arp-acl --disable-linux-tproxy --disable-epoll --disable-auth --disable-unlinkd --disable-htcp --with-maxfd=131072 --disable-wccpv2 --with-pthreads --enable-storeio=aufs,coss,null --disable-delay-pools --enable-snmp --disable-wccp --disable-ident-lookups --disable-pf-transparent --with-large-files --enable-large-cache-files --enable-err-languages=English --enable-default-err-language=English --prefix=/usr/local --mandir=/usr/local/man --infodir=/usr/local/info/

proxy# make clean && make && make install && rehash
proxy# touch /var/log/squid/access.log
proxy# touch /var/log/squid/cache.log
proxy# chown -R squid:squid /var/log/squid/*
proxy# chown -R squid:squid /cache*
Modify squid.conf that located in directory /usr/local/etc/squid to match with your existing network and cache directory you located. If found no problem let’s download additional file support like storeurl.pl, refresh conf, and tunning.conf. Those 3 conf files reflect in your squid.conf file, please read carefully your squid.conf file if you would like to change the location of 3 additional support file.
proxy# cd /usr/local/etc/squid/
proxy# fetch http://simplyeko.com/newlusca/squid.conf
proxy# fetch http://simplyeko.com/newlusca/storeurl.txt
proxy# mv storeurl.txt storeurl.pl
proxy# chmod +x storeurl.pl
proxy# fetch http://simplyeko.com/newlusca/refresh.conf
proxy# fetch http://simplyeko.com/newlusca/tunning.conf
Now download script to start/stop/restart Lusca, just fetch the file in directory /usr/local/etc/rc.d/
proxy# cd /usr/local/etc/rc.d/
proxy# fetch http://simplyeko.com/newlusca/squid
proxy# chmod +x squid
Now Lusca Proxy Server ready to serve the client,
proxy# squid -z
proxy# service squid start
If found no problem on your installation and configuration, you will find the squid process in your system by typing following command;
proxy# sockstat -4
proxy# ps -aux | grep squid


1 comment:

Anonymous said...

update-lusca.sh not work good so could not follow u it stop much times
thanks so much
salama
its good job u did