{"id":36,"date":"2010-10-20T16:31:53","date_gmt":"2010-10-20T22:31:53","guid":{"rendered":"https:\/\/www.guammie.com\/donovan\/2010\/10\/20\/squid-3-1-8-on-ubuntu-10-04\/"},"modified":"2010-10-20T16:42:10","modified_gmt":"2010-10-20T22:42:10","slug":"squid-3-1-8-on-ubuntu-10-04","status":"publish","type":"post","link":"https:\/\/www.guammie.com\/donovan\/2010\/10\/20\/squid-3-1-8-on-ubuntu-10-04\/","title":{"rendered":"Squid 3.1.8 on Ubuntu 10.04"},"content":{"rendered":"<p>I find Squid to be very useful and have been disappointed that 3.1 is still not in any repositories.&nbsp; I googled a little to see if anyone has already done this, since reinventing the wheel is not really my thing.&nbsp; There are a couple tutorials\/howtos, but I didn\u2019t really like either approach.&nbsp; One approach uses the Debian packages, which is fine, but even those are already out date by a few revisions.&nbsp; Another howto I came across had a broken startup script which caused me about 15 minutes of headache before I just gave up on it.<\/p>\n<p>So, I decided to install Ubuntu 10.04 server on a VM and do this from scratch from source.&nbsp; This is a default installation with no more than bringing the system fully up to date and installing openssh-server.&nbsp; I\u2019m assuming you are logged in as a regular user and are in your home directory.&nbsp; <\/p>\n<p>Off we go!<\/p>\n<p>1.&nbsp; First thing to do is install all the necessary dependencies:<br \/><em><font size=\"2\">sudo apt-get install build-essential libldap2-dev libpam0g-dev libdb-dev dpatch cdbs libsasl2-dev debhelper libcppunit-dev libkrb5-dev comerr-dev libcap2-dev libexpat1-dev libxml2-dev libssl-dev pkg-config dpkg-dev curl<\/font><\/em><\/p>\n<p>2.&nbsp; Get the file <br \/><font size=\"2\"><em>wget <\/em><em>http:\/\/www.squid-cache.org\/Versions\/v3\/3.1\/squid-3.1.8.tar.gz<\/em><br \/><\/font><\/p>\n<p>3.&nbsp; Create the log directories<br \/><em><font size=\"2\">sudo mkdir \/var\/log\/squid3<br \/>sudo chown -R proxy:adm \/var\/log\/squid3<br \/><\/font><\/em><\/p>\n<p>4.&nbsp; Create the cache directories and give them the correct permissions <br \/><em><font size=\"2\">sudo mkdir \/var\/cache\/squid3<br \/>sudo chown -R proxy:proxy \/var\/cache\/squid3<br \/><\/font><\/em><br \/>5. Build Squid 3.1<br \/><em><font size=\"2\">tar -xzf squid-3.1.8.tar.gz<br \/>cd squid-3.1.8<\/font><\/em><\/p>\n<p><em><font size=\"2\">.\/configure &#8211;build=x86_64-linux-gnu &#8211;prefix=\/usr &#8211;includedir=\/usr\/include &#8211;mandir=\/usr\/share\/man &#8211;infodir=\/usr\/share\/info &#8211;sysconfdir=\/etc &#8211;localstatedir=\/var &#8211;libexecdir=\/usr\/lib\/squid3 &#8211;disable-maintainer-mode &#8211;disable-dependency-tracking &#8211;disable-silent-rules &#8211;srcdir=. &#8211;datadir=\/usr\/share\/squid3 &#8211;sysconfdir=\/etc\/squid3 &#8211;mandir=\/usr\/share\/man &#8211;with-cppunit-basedir=\/usr &#8211;enable-inline &#8211;enable-async-io=8 &#8211;enable-ssl &#8211;enable-icmp &#8211;enable-useragent-log &#8211;enable-referer-log &#8211;enable-storeio=ufs,aufs,diskd &#8211;enable-removal-policies=lru,heap &#8211;enable-delay-pools &#8211;enable-cache-digests &#8211;enable-underscores &#8211;enable-icap-client &#8211;enable-follow-x-forwarded-for &#8211;enable-auth=basic,digest,ntlm,negotiate &#8211;enable-basic-auth-helpers=LDAP,MSNT,NCSA,PAM,SASL,SMB,YP,getpwnam,multi-domain-NTLM &#8211;enable-ntlm-auth-helpers=smb_lm &#8211;enable-digest-auth-helpers=ldap,password &#8211;enable-negotiate-auth-helpers=squid_kerb_auth &#8211;enable-external-acl-helpers=ip_user,ldap_group,session,unix_group,wbinfo_group &#8211;enable-arp-acl &#8211;enable-snmp &#8211;with-filedescriptors=65536 &#8211;with-large-files &#8211;with-default-user=proxy &#8211;enable-epoll &#8211;enable-linux-netfilter build_alias=x86_64-linux-gnu CFLAGS=&#8221;-g -O2 -g -Wall -O2&#8243; LDFLAGS=-&#8220;Wl,-Bsymbolic-functions&#8221; CPPFLAGS= CXXFLAGS=&#8221;-g -O2 -g -Wall -O2&#8243; FFLAGS=&#8221;-g -O2&#8243;<\/font><\/em><\/p>\n<p><em><font size=\"2\">sudo make<br \/>sudo make install<\/font><\/em><\/p>\n<p>I got the configure options from a doing a squid \u2013v with a repository install.&nbsp; I had to change enable-ntlm-auth-helpers=SMB to enable-ntlm-auth-helpers=smb_lm.<\/p>\n<p>6.&nbsp; The startup script references \/usr\/bin\/squid3, the binary is just called squid.&nbsp; Fix that.<br \/><font size=\"2\"><em>sudo ln -s \/usr\/sbin\/squid \/usr\/sbin\/squid3<\/em><br \/><\/font><\/p>\n<p>7.&nbsp; Install the <a href=\"https:\/\/www.guammie.com\/donovan\/files\/2010\/10\/squid3\" target=\"_blank\">startup script<\/a> to \/etc\/init.d\/ and make it executable<br \/><em><font size=\"2\">wget https:\/\/www.guammie.com\/donovan\/files\/2010\/10\/squid3<br \/>sudo mv squid3 \/etc\/init.d\/<\/font><\/em><br \/><em><font size=\"2\">sudo chmod +x \/etc\/init.d\/squid3<\/font><\/em><\/p>\n<p>8.&nbsp; Have Squid start on boot<br \/><em><font size=\"2\">sudo update-rc.d squid3 defaults<\/font><\/em><\/p>\n<p>And\u2026 here\u2019s a <a href=\"https:\/\/www.guammie.com\/donovan\/files\/2010\/10\/squid.conf\" target=\"_blank\">configuration file<\/a> I\u2019ve used.&nbsp; Real basic, nothing fancy.<\/p>\n<p>Just <em>sudo \/etc\/init.d\/squid3<\/em> <em>restart<\/em> and you should be good to go.<\/p>\n<p>Here are the <a href=\"https:\/\/www.guammie.com\/donovan\/files\/2010\/10\/Squid3.1Ubuntu10.04.txt\" target=\"_blank\">instructions<\/a> in a text file in case any formatting is messed up.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I find Squid to be very useful and have been disappointed that 3.1 is still not in any repositories.&nbsp; I googled a little to see if anyone has already done this, since reinventing the wheel is not really my thing.&nbsp; There are a couple tutorials\/howtos, but I didn\u2019t really like either approach.&nbsp; One approach uses [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[11],"tags":[],"class_list":["post-36","post","type-post","status-publish","format-standard","hentry","category-linux"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p1tGEc-A","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.guammie.com\/donovan\/wp-json\/wp\/v2\/posts\/36","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.guammie.com\/donovan\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.guammie.com\/donovan\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.guammie.com\/donovan\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.guammie.com\/donovan\/wp-json\/wp\/v2\/comments?post=36"}],"version-history":[{"count":3,"href":"https:\/\/www.guammie.com\/donovan\/wp-json\/wp\/v2\/posts\/36\/revisions"}],"predecessor-version":[{"id":39,"href":"https:\/\/www.guammie.com\/donovan\/wp-json\/wp\/v2\/posts\/36\/revisions\/39"}],"wp:attachment":[{"href":"https:\/\/www.guammie.com\/donovan\/wp-json\/wp\/v2\/media?parent=36"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.guammie.com\/donovan\/wp-json\/wp\/v2\/categories?post=36"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.guammie.com\/donovan\/wp-json\/wp\/v2\/tags?post=36"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}