Monday, May 16, 2011

Install LUSCA HEAD on ubuntu 11.04

Install LUSCA-CACHE on ubuntu

This time I wanted to share my experience in installing LUSCA-HEAD in ubuntu 11.04.
Some things that need to be prepared are:
1. PC servers with OS ubuntu 11:04,
   in this case I assume you already know how to install the ubuntu os
2. download LUSCA-HEAD source from   
    # wget http://code.google.com/p/lusca-cache/downloads/detail?name=LUSCA_HEAD-r14809.tar.gz&can=2&q=
3. extract its source code
   # tar -xzvf LUSCA_HEAD-xxxxxx.tar.gz
4. # cd LUSCA_HEAD-xxxxx
   before installing LUSCA we have to install some packet:
   # apt-get install gcc build-essential
   # apt-get install sharutils ccze libzip-dev automake1.9

5. # ./configure --prefix=/usr/local/squid
6. # make all
7. # make install
8. make user and group squid
   # useradd squid
   # groupadd squid
9. edit squid.conf on/usr/local/squid/etc/squid.conf and add:
   cache_effective_user squid
   cache_effective_group squid
   include /usr/local/squid/etc/tunning.conf
10. make tunning.conf file on /usr/local/squid/etc/tunning.conf
   content of the file is:

cache_dir aufs /usr/local/squid/var/cache 10000 16 256 (depending on harddisk)
cache_effective_user squid
cache_effective_group squid
header_access Accept-Encoding deny  all
client_persistent_connections off
server_persistent_connections on
half_closed_clients off
strip_query_terms off
quick_abort_min 0 KB
quick_abort_max 0 KB
quick_abort_pct 100
vary_ignore_expire on
reload_into_ims on
pipeline_prefetch on
read_timeout 30 minutes
client_lifetime 6 hours
negative_ttl 30 seconds
positive_dns_ttl 6 hours
negative_dns_ttl 60 seconds
pconn_timeout 15 seconds
request_timeout 1 minute
store_avg_object_size 13 KB
log_icp_queries off
ipcache_size 16384
ipcache_low 98
ipcache_high 99
log_fqdn off
fqdncache_size 16384
memory_pools off
forwarded_for on
cachemgr_passwd none all
client_db off
max_filedescriptors 4096
n_aiops_threads 24
load_check_stopen on
load_check_stcreate on
download_fastest_client_speed on
maximum_object_size 3 GB ( depending on ram)

11. change the permission on folder cache
    # chown squid:squid /usr/local/squid/var/cache
12. create a folder caching
    # /usr/local/squid/sbin/squid -z
13. execute the LUSCA
    # /usr/local/squid/sbin/squid
14. log LUSCA
    # tail -f /usr/local/squid/var/log/access.log
15. log cache LUSCA
    # tail -f /usr/local/squid/var/log/cache.log

2 comments:

Pedagang Asongan Online said...

untuk cara install ubuntu 11.04 bagaimana? maklum msh newbie, terutama untuk partisi harddisknya. trims

Anonymous said...

buat ngedit squid.conf nya gimana ya pak, mohon dibantu

terima kasih