October 27th, 2003, 05:34 PM
Installing and Configuring Squid on Linux from a Beginner's Perspective
This tutorial is written from the perspective a TRUE LINUX NEWBIE. This means that this is the first time that I've used Linux to accomplish anything other than browse the web. Some of this might not work for you, some more of it might be wrong. Lastly, I am a moron and frequently do dumb things. This was an accomplishment of astronimical proportions for someone as dimwitted as myself. That being the situation, this was keyed up from memory-- Lord have mercy... There are probably tons of mistakes in here that the gurus can straighten out. Don't flame me!!!
Before you start running through all of this, make sure that you have the Gnu C Compiler (gcc) installed as well as the 'make' command. I got stuck for a couple of minutes when I couldn't figure out why a seemingly simple command was throwing 'not found' error messages
1. Download Squid! Place it in a directory like /home/<username>/downloads. I'm working with the latest (at this time) release. 2.5.
2. Run 'mkdir /usr/local/squid/src' and copy the compressed Squid file to it. Move to that directory.
3. Run 'gzip -dv squid-2.5.STABLE4.tar.gz' followed by 'tar xvf squid-2.5.STABLE4.tar' to unpack everything.
4. Before you compile, you must configure! I went with the defaults for everything. Check the user's manual for more specific configuration options. Run './configure --prefix=/usr/local/squid'. Prefix specifies the destination directory, but you might just be able to run './configure' as the I keyed in is supposed to be the default. Perhaps someone could clarify.
5. Make sure that you're in /usr/local/squid/src/ and run the 'make' command. Afterwards, run 'make install'.
6. You now need to find the configuration file (squid.conf) which should be in /usr/local/squid/etc.
7. The tutorial says that there aren't many configuration options that should have to be changed and that most will find the 'out-of-the-box' installation suitable for their configurations, but it does warn you that one option will need to be changed as Squid blocks access to all browsers by default The configuration file name is 'squid.conf'. I tried to use vim to edit this file, I really did, but found it to be an exercise in complete and utter confusion so I switched to KDE and used kwrite The only modification that I made was to the first tag for 'http_port'. I just changed it to 8080 and removed the pound (I'm guessing that rem's the line out).
8. Start Squid! I went back to a command line, moved to /usr/local/squid/bin and ran 'squid -z' to create the swap directories and then I ran 'squid -N -d 1 -D -f /usr/local/squid/etc/squid.conf'. Squid started and I went to lunch. BLAMMO!!!
Hope that was enough. Like I said at the beginning, it's low on details, but should probably help a beginner or two find their way through the installation should they hit any snags.