Monday, 17 September 2007

Install Squid Proxy Server


Check for the user Squid:

1) #finger squid

If not then use the command

2) #useradd –d /usr/local/squid squid

Download the tar package from

3) wget

Extract & Install the tar package

4) #tar –zxvf squid-X.X.X.tar.gz

5) #/configure

6) #make

7) #make install

Now installation is complete. Configure your Squid server:

8) # vi /usr/local/squid/etc/squid.conf

http_port 8080

cache_mem 40 MB

cache_swap_low 80

cache_swap_high 85

maximum_object_size 8096 KB

minimum_object_size 0 KB

cache_dir ufs /usr/local/squid/cache 1024 16 128


cache_dir diskd /cache/cache1 9500 35 256

cache_dir diskd /cache/cache2 9500 35 256

cache_access_log /usr/local/squid/var/logs/access.log

cache_log /usr/local/squid/var/logs/cache.log

Configure your Access list to which you want to give permission to use your


acl all src

acl locallan src ##Your client Address & Subnet Mask

http_access allow locallan

http_access deny all

Give the Permission to the user:

cache_effective_user squid

Configure your Host name:


For creating cache directory

#/usr/local/squid/sbin/squid –z

#chown –R squid.squid /usr/local/squid/

#chmod 777 /usr/local/squid/

To run squid


Now configure a client with the IP which you use in your ACL part with port 8080. Because we use the port 8080. And test your proxy server with the following command:

#tail -f /usr/local/squid/var/logs/access.log

Now you browse a site from your configured client PC. If your server is working well you browse successfully and see your access log in your server. You also check your squid process by the following command:

#pgrep squid

Hope your server is working well. If you face any problem please mail to me.

No comments: