Squid is such us web-caching program running on both linux or windows operationg system. Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-requested web pages. Squid has extensive access controls and makes a great server accelerator. It runs on most available operating systems, including Windows and is licensed under the GNU GPL (http://www.squid-cache.org/) at this time squid has been up to version 2.7.
To build a successfully proxy server needs a preparation and little it knowladge of server administration, in this article we will explain step by step how to configuring and monitoring Squid Proxy server in Ubuntu 10.04. Before we start to install, setting then tunning Squid 2.7 better if we prepare sytem enviroment to support the performance of squid proxy server then.
We need resources at least CPU using proccessor intel pentium 4 (or equivalent), RAM 1 GB (Minimal) and HDD 40 GB (Minimal) ,latest Ubuntu Version (10.04) and internet connection to get/Install Ubuntu package. If all resources is ready let start to make a 'robust' proxy server.
- Install Ubuntu 10.04 into Hard drive, Don't forget to use 'advance' mode to setup a partition, then make partition called '/cache' where cache will be placed with size approximately 10 Gb (we can resize latter).
- If all installation progress is finished and successfully, go to application > accessoories > terminal to install squid proxy server by command.
apt-get install squid
- You already have Squid 2.7 installed in your harddrive now, you can start configuring your proxy server by editing squid configuration file in '/etc/squid/squid.conf', you can download this squid configuration or searching by google with keywords : high performance squid proxy server setting".
- Build a squid caching file *type this command in your teminal
/usr/sbin/squid -z
- Running test your squid performance. *type this command in your teminal
/usr/sbin/squid -NCd1
- Restart Squid,your proxy server is ready to use now.
/etc/ini.d/squid restart
To get best performance of squid proxy server we have to reconfiguring/tunning several times, we can use application which help us to controling and monitoring a squid performance, In this section we have 3 different application (same purpose) which can help us to monitoring/controling a squid performance.
- Squid Cache Manager (cachemgr), is default application for squid (not default installed) to monitor and tunning a squid performance, we can install cachemgr by typing command 'apt-get install squid-cgi' on terminal, before we can use cachemgr setting user and password in /etc/squid/squid.conf then access via browser by address http://localhost/cgi-bin/cachemgr.cgi.
- Calamaris, is not official squid monitoring program but very recemended to use, you can go to ths link to see the example of calamaris report sheet. we can install calamaris by typing command 'apt-get install calamaris' on terminal. Before we could read calamaris report sheet we must generate first using command 'calamaris -a -F html /var/log/squid/access.log > /var/www/calamaris/index.html' the access the report in 'http://localhost/calamaris'.
- Sarg - Squid Analysis Report Generator is a tool that allow you to view "where" your users are going to on the Internet. Sarg provides many informations about Squid users activities: times, bytes, sites, etc (http://sarg.sourceforge.net/). Sarg is closed to squid monitoring 'activity' program rather than squid performance monitoring tools, as example using Sarg we can see who is the most active client/user and where they going. To isntall Sarg we can use terminal by typing command 'apt-get install calamaris'.