Skip to content

Instantly share code, notes, and snippets.

@smj10j
Created August 23, 2016 17:31
Show Gist options
  • Select an option

  • Save smj10j/ae286ce48adfc1bed3c5501b3cc193f3 to your computer and use it in GitHub Desktop.

Select an option

Save smj10j/ae286ce48adfc1bed3c5501b3cc193f3 to your computer and use it in GitHub Desktop.
Fetches, builds, and installs the Squid4 proxy on Ubuntu/Debian
#!/bin/bash
set -e
set +x
#wget http://www.squid-cache.org/Versions/v4/squid-4.0.13.tar.gz
#tar -xvzf squid*
#cd squid*
prefix=/usr
./configure --prefix=$prefix \
--libdir=${prefix}/lib
--includedir=${prefix}/include \
--libexecdir=${prefix}/lib/squid \
--datadir=${prefix}/share/squid \
--mandir=${prefix}/share/man \
--infodir=${prefix}/share/info \
--sysconfdir=/etc/squid \
--localstatedir=/var \
--srcdir=. \
--with-logdir=/var/log/squid \
--with-pidfile=/var/run/squid.pid \
--with-default-user=proxy \
--with-filedescriptors=65536 \
--with-openssl \
--with-large-files \
--enable-ssl \
--enable-ssl-crtd \
--enable-x-accelerator-vary \
--enable-forw-via-db \
--enable-inline \
--enable-async-io=8 \
--enable-storeio=ufs,aufs,diskd,rock \
--enable-removal-policies=lru,heap \
--enable-delay-pools \
--enable-cache-digests \
--enable-underscores \
--enable-follow-x-forwarded-for \
--enable-auth-basic=DB,fake,getpwnam \
--enable-auth-digest=file \
--enable-external-acl-helpers=file_userip,SQL_session,unix_group,wbinfo_group \
--enable-url-rewrite-helpers=fake \
--enable-eui \
--enable-esi \
--enable-zph-qos \
--enable-linux-netfilter \
--disable-translation \
--disable-maintainer-mode \
--disable-dependency-tracking \
--disable-silent-rules \
--build=i686-linux-gnu \
build_alias=i686-linux-gnu \
'CFLAGS=-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall' \
'LDFLAGS=-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now' \
'CPPFLAGS=-D_FORTIFY_SOURCE=2' \
'CXXFLAGS=-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security'
make
sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment