Compiling Squid in Ubuntu 7.10

Compiling Squid 2.6 in Ubuntu is easy, once you know that there are different command line options you must use aside from the defaults (which are specific to BSD-flavored systems).  Note that I specifically enabled digest authentication with the –enable-auth=digest  switch because our intended application of Squid  needed a more secure password transmission method than Basic Authentication.   Here’s some general steps:

  1. Download and upack the Squid source. I used Squid 2.6 for this.
  2. Open a terminal and change to your Squid source directory.
  3. Type the follwong and press enter:

    sudo ./configure –enable-auth=digest –prefix=/usr –localstatedir=/var –libexecdir=${prefix}/lib/squid –srcdir=. –datadir=${prefix}/share/squid –sysconfdir=/etc/squid

  4. After a hundred lines or so scroll by, enter the following:

    sudo make
  5. After several, even more ugly lines go by, type the following:

    sudo make install

  6. There is no way to set the default location of the log files with Squid using configure, and I couldn’t get the recommended patch to work, so I came up with an easier solution.  Issue the command:

    ln -s /var/log /var/logs

That’s it. Squid is installed. Now, I didn’t say Squid is actually configured on Ubuntu at this point.  Getting it all set up is a story for another day! Depending on several factors, you’ll have to do a lot of chmods to make sure the permissions are right! Someday, I will probably post my PHP-CLI scripts that control user authentication and site blocking! Until then, good luck.

Leave a Reply

Your email address will not be published. Required fields are marked *