The current Debian package for squid is on the 3.1.x branch and hasn’t upgraded to 3.3 yet which offers full HTTP/1.1 support. I already had a working squid on the Debian package and decided to just upgrade the running install. Below are the steps that led to a successful upgrade (backup your configuration before attempting).

Download and extract the source for squid 3.3:

tar xvzf squid-3.3.4.tar.gz
cd squid-3.3.4
apt-get build-dep squid3

Configure squid using the Debian environment:

./configure --build=i486-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libexecdir=${prefix}/lib/squid3 --disable-maintainer-mode --disable-dependency-tracking --disable-silent-rules --srcdir=. --datadir=/usr/share/squid3 --sysconfdir=/etc/squid3 --mandir=/usr/share/man --with-cppunit-basedir=/usr --enable-inline --enable-async-io=8 --enable-storeio=ufs,aufs,diskd --enable-removal-policies=lru,heap --enable-delay-pools --enable-cache-digests --enable-underscores --enable-icap-client --enable-follow-x-forwarded-for --enable-auth --enable-basic-auth-helpers="LDAP,MSNT,NCSA,PAM,SASL,SMB,YP,DB,POP3,getpwnam,squid_radius_auth,multi-domain-NTLM" --enable-ntlm-auth-helpers="smb_lm" --enable-digest-auth-helpers="ldap,password" --enable-negotiate-auth-helpers=squid_kerb_auth --enable-external-acl-helpers=ip_user,ldap_group,session,unix_group,wbinfo_group --enable-arp-acl --enable-esi --disable-translation --with-logdir=/var/log/squid3 --with-pidfile=/var/run/ --with-filedescriptors=65536 --with-large-files --with-default-user=proxy --enable-linux-netfilter build_alias=i486-linux-gnu CFLAGS="-g -O2 -g -Wall -O2" LDFLAGS= CPPFLAGS= CXXFLAGS="-g -O2 -g -Wall -O2"

Stop squid if it is running:

/etc/init.d/squid3 stop

Build and install the new squid:

make install

Move the binary to squid3:

mv /usr/sbin/squid3 /usr/sbin/squid3_old
mv /usr/sbin/squid /usr/sbin/squid3

If you have the following line in your current configuration you will have to remove it:

acl manager proto cache_object

Now you should be able to launch squid back up using 3.3.4

/etc/init.d/squid3 start

1 Comment

debian 6 下编译squid 3.3.6 | 飘雪的博客 · July 6, 2013 at 2:56 am

[…] 参考: […]

Leave a Reply

Avatar placeholder

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