[squid-users] Compile and Install squid 3.5.12 in a fresh Linux OS

Amos Jeffries squid3 at treenet.co.nz
Fri Jan 1 23:19:13 UTC 2016


On 2016-01-02 11:36, Billy.Zheng wrote:
> Hi, I have tried to compile and install Squid 3.5.12 in a fresh
> CentOS 7 VPS host, because I doesn't understood so many configure,
> so I just with minimum configure  I understood, I need openssl
> to open a https port, and I need basic_auth to support user/password
> authentication, so I just with following config:
> 
> ./configure --build=x86_64-linux-gnu \
>     --prefix=/usr \
>     --exec-prefix=/usr \
>     '--bindir=${prefix}/bin' \
>     '--sbindir=${prefix}/sbin' \
>     '--libdir=${prefix}/lib64' \
>     '--libexecdir=${prefix}/lib64/squid' \
>     '--includedir=${prefix}/include' \
>     '--datadir=${prefix}/share/squid' \
>     '--mandir=${prefix}/share/man' \
>     '--infodir=${prefix}/share/info' \
>     --localstatedir=/var \
>     '--with-logdir=${localstatedir}/log/squid' \
>     '--with-pidfile=${localstatedir}/run/squid.pid' \
>     '--with-swapdir=${localstatedir}/spool/squid' \
>     --sysconfdir=/etc/squid \
>     --with-openssl \
>     --enable-epoll \
>     --enable-auth \
>     --enable-auth-basic
> 
> it worked!

You can skip the --enable-auth and --enable-auth-basic as well if you 
like. Both are enabled by default.

> 
> But compare to the CentOS 7 yum package version, I found my own less 
> many
> config. following is missing list I never use in my own compile 
> version.
> 
> --host=x86_64-redhat-linux-gnu \
> --disable-strict-error-checking \
> --disable-dependency-tracking \
> --enable-follow-x-forwarded-for \
> --enable-auth-ntlm=smb_lm,fake \
> --enable-auth-digest=file,LDAP,eDirectory \
> --enable-auth-negotiate=kerberos \
> --enable-external-acl-helpers=file_userip,LDAP_group,time_quota,session,unix_group,wbinfo_group
> \
> --enable-cache-digests \
> --enable-cachemgr-hostname=localhost \
> --enable-delay-pools \
> --enable-icap-client \
> --enable-ident-lookups \
> --enable-linux-netfilter \
> --enable-removal-policies=heap,lru \
> --enable-ssl-crtd \
> --enable-storeio=aufs,diskd,ufs \
> --enable-wccpv2 \
> --enable-esi \
> --enable-ecap \
> --with-aio \
> --with-default-user=squid \
> --with-filedescriptors=16384 \
> --with-dl \
> --with-pthreads
> 'build_alias=x86_64-redhat-linux-gnu'
> 'host_alias=x86_64-redhat-linux-gnu'
> 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
> -fstack-protector-strong --param=ssp-buffer-size=4 
> -grecord-gcc-switches
> -m64 -mtune=generic -fpie'
> 'LDFLAGS=-Wl,-z,relro  -pie -Wl,-z,relro -Wl,-z,now'
> 'CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
> -fstack-protector-strong --param=ssp-buffer-size=4 
> -grecord-gcc-switches
> -m64 -mtune=generic -fpie'
> 'PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'
> 
> I want to use newest version Squid, but i think I perhaps missing
> something important option maybe, which can cause risk in some case?
> 

No. Distro packagers like to list all the features enabled explicitly. 
All options are optional (hence the name).

> Could any please help me for a `standard necessary' configure arguments
> for current 3.5 serious?

For CentOS see:
<http://wiki.squid-cache.org/KnowledgeBase/CentOS#Compiling>

or you could use the YUM repository listed earlier on the page. IIRC, 
Eliezer has 3.5.12 packages that match what you need.

> 
> Or, just tell me, this worked, it is fine, and I will very happy to 
> use.
> 
> btw: When I first install, ./configure is passed, but make is failed.
> because I am not install gcc-c++. I have to install gcc-c++, 
> reconfigure
> again, make is passed. I thought if ./configure could detect gcc-c++
> is not installed, will more good.

./configure should not have passed. Should have exited with a "compiler 
cannot make executables" error. Maybe you have some other c++ compiler 
on the system.

Amos



More information about the squid-users mailing list