command
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 http://freshmeat.net/redir/squid/9942/url_tgz/squid-2.6.STABLE4.tar.gz
3) wget http://freshmeat.net/redir/squid/9942/url_tgz/squid-2.6.STABLE4.tar.gz
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
or
cache_dir diskd /cache/cache1 9500 35 256
cache_dir diskd /cache/cache2 9500 35 256
cache_log /usr/local/squid/var/logs/cache.log
Configure your Access list to which you want to give permission to use your
server:
acl all src 0.0.0.0/0.0.0.0
acl locallan src 192.168.9.0/255.255.255.0 ##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:
visible_hostname
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
#/usr/local/squid/sbin/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.
0 comments:
Post a Comment