creating a partition for squid

i really have been wondering how i will create seperate partition for squid to cache web contents. i clearly know how to create a partition but my problem is how to make it squid cache. any assistance.

Popular White Paper On This Topic

Hi !
Its very simple . Just edit the squid.conf file just to point the cache
directory to the partition u want to use as cache directory.
Example:
Cache directory u created for squid: /squid
cache_dir aufs /squid .......... change in squid.conf
chown -R squid:squid /squid --------grant the permission for squid.

1. Open /etc/squid/squid.conf (as root). (Or find out the location of
squid.conf file in your system).

2. Add or Change the following line. Values may be changed according to
requirement.

cache_dir /directoryname 100 16 256

Notes:
/directoryname can be a seperate partition. It should exist. Squid will not
create it for you.
100 = Disk Space in MB to be used for cache
16 = Number of First Level directories to create for cache operation.
(automatically created).
Cache files and directories will be stored under these first level
directories, under /directoryname.
256 = Number of Second Level directories to create for cache operation.
(automatically created).
Cache files / directories will be stored here.

3. Other parameters like cache_peer (if you have multiple cache machines),
cache_mem (amount of RAM used to store in-transit objects), cache_mgr (user
who manages the cache - default root), cache_effective_user (which user the
squid daemon should run as to access the cache), etc may be modified as
required.

Copyright 1998-2015 Ziff Davis, LLC (Toolbox.com). All rights reserved. All product names are trademarks of their respective companies. Toolbox.com is not
affiliated with or endorsed by any company listed at this site.