Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
Squid is an Open Source Caching Proxy Server

Squid is an Open Source Caching Proxy Server

Ratings: (0)|Views: 401 |Likes:
Published by rsaravanavelu

More info:

Published by: rsaravanavelu on Oct 23, 2009
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less





Shttp://www.basicconfig.com/linuxserver http://www.Ceylonlinux.com/book.html
squid is an open source caching proxy server. As a cache proxy server, squid accepts requestdata from client and passes it to appropriate Internet server. It keeps a copy of the returneddata, especially hot objects cached in RAM. Squid also caches DNS lookups and supports non-blocking DNS lookups. Even when a client terminates a request, squid continues to fetch andcomplete the requested data. When it receives the same request again from other client, it just passes the stored data in its cache. This is the basic concept of how squid works,speeding up the Internet access and saving bandwidth.Other than http protocol, squid supports FTP, gopher, and HTTP data objects. Squid alsosupports other caching protocols too, such as:
Internet cache protocol (ICP)
Cache digests
Simple network management protocol (SNMP)
Hyper text caching protocol (HTCP)A cache proxy server can greatly improve Internet performance and squid cache proxy serveris very fast and well known for high performance caching proxy server in Linux world. Anormal firewall proxy does not store copy of returned data like squid does. Squid cache proxyserver works great with firewall on the upper level and squid in the lower level protecting localnetwork from each other.
Setup squid cache proxy server in Ubuntu
Before setting up a squid cache proxy server, you should consider several things that willinfluence the performance of the caching server later. The most important things are serverhardware.
Basic hardware requirements
As we already know, squid stores meta data especially hot objects cached in RAM. So having abig RAM will improve squid performance and overall server performances. However, cpu powerdoesn't really effect squid performance.
While keeping all caches in the hard disk, having a fast random-seek-time hard disk wouldboost squid performances. A high rpm hard disk is good but the price is higher. You wouldbetter consider adding extra hard disk with fast random-seek-time because having many harddisk also improve squid performances.
Install squid proxy in Ubuntu
You can check whether squid is already installed by checking squid service with ps command.To simply grab a running squid service with ps command, add | (pipe) and grep option like theexample below:
luzar@ubuntu:~$ps aux | grep squidluzar 5667 0.0 0.1 3236 796 pts/0 S+ 16:45 0:00 grep squidluzar@ubuntu:~$
So there is no squid process running in our system. Then we can install squid package usingapt-get package management system. Example of squid package installation in Ubuntu usingapt-get:
luzar@ubuntu:~$sudo apt-get install squidReading package lists... DoneBuilding dependency treeReading state information... DoneThe following extra packages will be installed:openssl-blacklist squid-common ssl-certSuggested packages:squidclient squid-cgi logcheck-database resolvconf smbclient winbindThe following NEW packages will be installed:openssl-blacklist squid squid-common ssl-cert0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.Need to get 7542kB of archives.After this operation, 19.5MB of additional disk space will be used.Do you want to continue [Y/n]? YGet:1
intrepid/main openssl-blacklist 0.4.2[6337kB]4% [1 openssl-blacklist 360983/6337kB 5%] 4770B/s 25min5s
As you can see, squid file is quite big. So the downloading and installation is going to takesome times. After the installation is finished, you can begin configuring squid as a cachingproxy server.
Configure squid caching proxy server in Ubuntu
Squid configuration file is in /etc/squid directory. So change directory to /etc/squid and seewhat we have there.
luzar@ubuntu:~$cd /etc/squid/luzar@ubuntu:/etc/squid$ lssquid.confluzar@ubuntu:/etc/squid$
We just have one file, squid.conf, which is the main configuration file for squid. For a safetyreason, we will make a copy of squid.conf as a backup before we start editing the file. Here isa command to copy squid.conf:
luzar@ubuntu:/etc/squid$sudo cp squid.conf squid.conf.bacluzar@ubuntu:/etc/squid$ ls -ltotal 344-rw------- 1 root root 168394 2008-12-24 16:20 squid.conf-rw------- 1 root root 168394 2008-12-24 17:07 squid.conf.bacluzar@ubuntu:/etc/squid$
Here is a step by step guide on how to configure a basic squid caching proxy server. Opensquid.conf with your favorite text editor. Here is an example using vim editor :
luzar@ubuntu:/etc/squid$sudo vim squid.conf[sudo] password for luzar:
This is an example of squid.conf file when you open it with vim editor:

Activity (4)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
Heppy liked this
rush_aztech liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->