Graphic Motion Video Art, Website, IT Network, Culture

Loading...
Installing Lusca Head for Proxy on Ubuntu Server
This is the second part of the ubuntu server installation in order build a proxy server using squid Lusca Head. Lusca Head is one of squid development to build a proxy server that based on ubuntu server. lusca Head focus in optimizing the Squid by tweaking the caches of the squid proxy. I would suggest you to use ubuntu server to bulid the proxy server for more powerful and stable.

The process of the installation lusca head can be done from the server itself or from the client on your network. the accessing ubuntu server via remotely from the client that using windows using remote application, it allow you copy and paste some command lines easier. It is probably much those of you who do not like much typing with the command line of linux ubuntu. In this case I was using lusca head-r14809, the process lusca head installation on ubuntu server you can completely see in this following video.

Assuming that we have made ubuntu server with the kind partitions as our plan before, the caches is located into 5 partitions as the storage of the proxy caches. Hit and Miss of the proxy caches will work faster and stable. I have used putty as the application to remote server from the client as shown like the picture below!


You have to know the hostname or ip address of your ubuntu server, and we can access the server using ssh port 22 by default. Then click open, the security warning will be show up, click yes, now you have entered to your ubuntu server and installing lusca head ready to begin. You must enter the server as root, there are some ways as I have talked about!


type : sudo-i
your root password
now you have to be root, and ready to do installation and configuration on ubuntu server

type or paste : apt-get update && apt-get upgrade
this step will update and upgrade some packages for some ubuntu server application, this step need the internet connection to the server.

wget https://lusca-cache.googlecode.com/files/LUSCA_HEAD-r14809.tar.gz
this step will downloading LUSCA Head r14809 from the source-code, the internet connection is required again.

tar -zxvf LUSCA_HEAD-r14809.tar.gz
this step will extract LUSCA_HEAD-r14809.tar.gz in a new directory

cd LUSCA_HEAD-r14809/
Go to lusca head directory root where the extracted files have placed

./configure --prefix=/usr/local/squid --exec-prefix=/usr/local/squid --enable-delay-pools --enable-cache-digests --enable-poll --enable-linux-netfilter --enable-removal-policies --with-maxfd=8192 --enable-storeio=aufs --disable-wccp --enable-x-accelerator-vary --enable-kill-parent-hack --enable-async-io=30 --disable-ident-lookups
Compiling lusca head in some configurations

make all && make install

This step is installing lusca head that will be run as the compile configuration.

/usr/local/squid/sbin/squid -v
It will check squid version

cd /usr/local/squid/etc
Go to etc directory root

mv /usr/local/squid/etc/squid.conf /usr/local/squid/etc/squid.conf.original
Change squid.conf as squid.conf.original as the backup file that may sometime you need

rm -rf squid.conf && touch squid.conf && nano squid.conf
Remove squid.conf now, make a new blank file as squid.conf and open it into terminal editor so that you can fill a new squid.conf configuration.
touch storeurl.pl && nano storeurl.pl
making storeurl.pl file, open into terminal editor and you can fill by your storeurl.pl configuration

chown proxy:proxy squid.conf && chmod 777 squid.conf && chown proxy:proxy storeurl.pl && chmod a+x storeurl.pl
change the own permission of squid.conf and storeurl.pl so that we can change it from any client that connected

chown proxy:proxy /cache-{1,2,3,4,5} && chmod 777 /cache-{1,2,3,4,5}
Because I have created 5 cache partitions, it is also allow to be changed. If you don't create the caches partitions. You must create a new the directory, it is not recommended in order to get an optimal proxy server. but if you want to do so, this is will be the command line : mkdir /cache && chown proxy:proxy /cache && chmod 777 /cache

mkdir /var/log/squid && chown proxy:proxy /var/log/squid && chmod 777 /var/log/squid
Make directory squid and change the own permission 777, if you think it is not secure change to be 644 or anything you want, you must undertand the own permission files number.

cd /var/log/squid && touch access.log cache.log store.log && chmod 777 access.log cache.log store.log && chown proxy:proxy access.log cache.log store.log
Go to squid directory root and make access.log, cache.log, store.log to the current directory and make change the own permission to those files.

/usr/local/squid/sbin/squid -z
Creating swap from the caches

tail -f /var/log/squid/access.log | ccze
To see all the activity of the squid lusca head that shown in access.log

echo "/usr/local/squid/sbin/squid -NDd1 &" >> /etc/rc.local
Somebody said that this can run the squid automatically when you every time reboot, but it doesn't work for me.

This is the alternative steps that works for me in order to make squid lusca head run automatically everytime when ubuntu server first time to start or reboot, it can be squid lusca head run automatically.

cd /etc/init.d : go to init.d
touch runningsquid.sh && nano runningsquid.sh : make and open runningsquid.sh
/usr/local/squid/sbin/squid -NDd1 & : insert this code and save it in runningsquid.sh
chmod +x /etc/init.d/runningsquid.sh : change the own permission of runningsquid.sh
update-rc.d runningsquid.sh defaults : runningsquid.sh will update as default
touch cek && nano cek : still on init.d make open a new file "cek"
tail -f /var/log/squid/access.log | ccze : fill cek file with this command line
chmod +x cek : change the own permission cek
./cek : see the activity access.log in short command line ./cek

Share This Article :
Related Articles

14 comments :

  1. Are you sure youtube not caching, you have play again any youtube video. I think any problem in squid.conf and storeurl.pl configuration. Learn more in configuring squid.conf for lusca head!

    ReplyDelete
    Replies
    1. yes .. youtube not caching ......if you have program team viewer ...you can visit my pc and control on squid server .. if you do not mind

      Delete
    2. Try to check the squid.conf one by one, most likely cause is in configuration inside squid.conf, that is still any not match with your network.

      Delete
    3. i used ubuntu 14.04... caching only ..http ...give me your address facebook or yahoo masnger i will contact you

      Delete
    4. do you know? i install ubuntu more than 33 time ..when i install squid lusca .. i did not succeed

      Delete
    5. Oh I am sorry friend! what can I say anymore, I am rather busy for now, I can not give you any advice in more details again!

      Delete
    6. Om Swastyastu, Om mau tanya nih, untuk video sebelumnya mengenai tuning squid proxy and unbound dns, apakah systemnya sama dengan lusca proxy? Mohon informasinya Om.

      Delete
    7. In the latest version
      Does it benefit the same settings

      liquidtelecom.dl.sourceforge.net/project/fokus/LUSCA_HEAD-r14945.tar.gz

      Delete
  2. pls squid.conf and storeurl.pl file Exact

    its website Different from your file in video

    ReplyDelete
  3. om di intip juga om tentanf lusca hasil begadangan ane mudah"an bermanfaat: http://www.pashacomp.net/2013/11/high-performance-cache-hit-proxy-lusca.html

    ReplyDelete
  4. sir i have already installed ubunto server14 squid 3.4.5 exexting install lusca head no another install ubunto server then install lusca

    ReplyDelete

Back to Top