First you need XCode and developer tools from either your DVD or the Apple web site.
Then download the source code from squid-cache.org. Current version is 3.1.10 released 22 Dec 2010. Current version are here. I downloaded the bz2, any will work. I moved it to the XCode folder on my hard disk, in the path
The run these commands:
tar xjf squid-3.1.10.tar.bz2
sudo make install
- Don't have any spaces in the path to the source code else the build WILL fail!
- The only build option I used is to enable SSL so I can proxy https. For a full list of whats available you can do
for ease of use you can pipe this to a text file for reading:
./configure --help >build_options.txt
- It can take some time, do not worry
- You will get some errors, do not worry, as long as there is no space in the path!
- If you do get errors, likely XCode needs re-installing
It also has the default modules, so you can play.
Next, chown the Squid's directory so it has write access to its logs and caches:
sudo chown -R nobody:wheel /usr/local/squid
Then you need to create the cache directories:
sudo /usr/local/squid/sbin/squid -z
The default config file works OK! The only out of the box change I would make is to remove the image from the error file. In the file
find the line
"background: url('http://www.squid-cache.org/Artwork/SN.png') no-repeat left;"
and delete it. Save the file.
Now, start Squid:
You can point you local machine to 127.0.0.1:3128 and show its working.
if you decide to enable the cache, and then do
sudo /usr/local/squid/sbin/squid -k reconfigure
you might get
"2011/01/15 14:44:08| WARNING cache_mem is larger than total disk cache space!"
do not worry, its a spurious error. Things will still work OK.
See some other postings on Squid and OSX.