twitter
    Find out what I'm doing, Follow Me :)

Monday, July 11, 2011

How to Install SQUID Proxy Server@Linux....

Certainly Squid server is a favourite open source GPLd proxy and web cache. It’s a variety of functions, from accelerating a web server by caching repeated requests, to caching web, name server query , and other network lookups for a group of people sharing network resources. It is mainly designed to run on Linux / Unix-like systems. Squid is a high-performance proxy caching server for Web clients, supporting FTP, gopher, and HTTP data objects. Unlike traditional caching software, Squid handles all requests in a single, non-blocking, I/O-driven technique. Squid maintains meta data and specially hot objects cached in RAM, caches DNS lookups, supports non-blocking DNS lookups, and implements negative caching of failed requests. Squid comprises of a main server program squid, a Domain Name System lookup program (dnsserver), a program for retrieving FTP data (ftpget), and a lot of management and client tools.


Here is the instruction on how to install Squid proxy server:
1. Download Squid Cache
You can download Squid at http://www.squid-cache.org/Versions/ . There, you can see a lot of version of Squid. I prefer you to download the latest version. Here is the link for the latest version:
http://www.squid-cache.org/Versions/v3/3.0/squid-3.0.STABLE8.tar.gz
Note: If you want to download it directly from your server. Please use the following command:
wget http://www.squid-cache.org/Versions/v3/3.0/squid-3.0.STABLE8.tar.gz
2. Squid Cache Installation
To extract the downloaded compressed file, please use the following command:
tar -zxvf squid-3.0.STABLE8.tar.gz
this will create a directory named squid-3.0.STABLE8 at the current directory. Next, go into the directory:
cd squid-3.0.STABLE8
To build and install the Squid Cache, type:
./configure --prefix=/usr/local/squid
make all
make install

The command above will install squid in directory /usr/local/squid
3. Customize and Run Squid Cache
1. customize the squid.conf configuration file:
vi /usr/local/squid/etc/squid.conf
2. Initalise the cache:
/usr/local/squid/sbin/squid -z
3. start the cache:
/usr/local/squid/sbin/squid
Note: If you have problem to initialize the cache, please give the write permission (preferably chmod 777) for the specified directory.
Verify Squid Cache Installation
netstat -tulpn | grep 3128
Output:
tcp        0      0 0.0.0.0:3128                0.0.0.0:*
If you get the output above, you have successfully install Squid proxy server. :)
4. Client Configuration
Open a web browser > Tools > Internet option > Network settings > and setup Squid server IP address and port # 3128.
Good Luck!

No comments:

Post a Comment