Installing Squid—a caching agent
To install squid, we will use the zc.recipe.cmmi recipe (http://pypi.python.org/pypi/zc.recipe.cmmi) and plone.recipe.squid recipe (http://pypi.python.org/pypi/plone.recipe.squid).
In 06-deployment-optimization-squid.cfg, we have:
[buildout] extends = 06-deployment-optimization-varnish.cfg parts += squid-install squid [squid-install] recipe = zc.recipe.cmmi url = http://www.squid-cache.org/Versions/v3/3.0/\ squid-3.0.STABLE21.tar.gz [squid] recipe = plone.recipe.squid:instance cache-size = 1000 daemon = ${squid-install:location}/sbin/squid backends = 127.0.0.1:8080 bind = 127.0.0.1:3128
Now stop Varnish and run Buildout:
$ bin/buildout -c 06-deployment-optimization-squid.cfg
Next, be sure to create some cache swap directories for Squid, with the following command:
$ bin/squid -z
You should see:
$ bin/squid -z 2010/05/21 11:54:41| Creating Swap Directories
Next, start Squid in the foreground (with –N
), as shown:
$ bin/squid -N
Now, browse...