subject: How to create cache in Squid 2.7 Easiest way [print this page] How to create cache in Squid 2.7 Easiest wayHow to create cache in Squid 2.7 Easiest way
In this tutorial you learn how to create cache in squid and using squid as transparent proxy
Most operating system distributions provide packages in the formats appropriate for direct install on those systems.
Installation of Squid
For DEBIAN apt-get install squid
For Fedora yum install squid
For FreeBSD pkg_add -r squid
For Gentoo emerge squid
For Mandrivia urpmi squid
RedHat Enterprise Linux (RHEL) http://people.redhat.com/jskala/squid/squid-2.7.STABLE9-1.el4
Command rpm ivh squid-2.7.STABLE9-1.el4
For Solaris pkg-get -i squid
For Ubuntu apt-get install squid
For SUSE11 yum install squid
Define Access log
vi /etc/squid/squid.conf
search this line "TAG: access_log"
and define access_log location will be generated by Squid
Change squid Port and Squid Transparent
Search this line TAG: http_port under Network Setting
it is recommend to change port 3128 to xxxx & Define your own setting
example: http_port 192.168.1.1:3128 transparent
Create Cache Squid 2.7
Search cache_mem under Memory cache option
by default #cache_mem=8 MB
but this option vary your RAM size (increse ram and max cache_mem)
i suggest use 1/2 for your memory 1bg ram then use 512 MB
See next TAG: maximum_object_size_in_memory
change this to maximum_object_size_in_memory 5000 KB
and last define cache directory where squid create cache
by default location is cache_dir ufs /var/cache/squid 100 16 256
change this setting to cache_dir ufs /var/cache/squid 2000 16 256
minimum_object_size 10 KB
maximum_object_size 14096 KB
and you done for verfy check squid cache log and access log
Note: if your facing cache Problem harddive full
First Stop Squid 2.7
/etc/init.d/squid stop
goto cd /var/cache/squid/
then run this rm -rf * & squid -z
If you find usefull info In this article plz visit http://www.amenext.com