[Server-devel] Squid fixed
Tony Pearson
tpearson at us.ibm.com
Sun Feb 10 10:29:41 EST 2008
Adrian, Sulochan,
Thanks for the guidance.
==>First, it looks like I have multiple "sysconfdir" directories when I do
squid -v I see both /etc and /etc/squid:
[root at schoolserver squid]# squid -v
Squid Cache: Version 2.6.STABLE16
configure options: '--build=i386-redhat-linux-gnu'
'--host=i386-redhat-linux-gn
u' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr'
'--exec-
prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
'--in
cludedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec'
'--shared
statedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info'
'--exec
_prefix=/usr' '--bindir=/usr/sbin' '--libexecdir=/usr/lib/squid'
'--localstatedi
r=/var' '--datadir=/usr/share' '--sysconfdir=/etc/squid' '--enable-epoll'
'--ena
ble-snmp' '--enable-removal-policies=heap,lru'
'--enable-storeio=aufs,coss,diskd
,null,ufs' '--enable-ssl' '--with-openssl=/usr/kerberos'
'--enable-delay-pools'
'--enable-linux-netfilter' '--with-pthreads'
'--enable-ntlm-auth-helpers=SMB,fak
eauth'
'--enable-external-acl-helpers=ip_user,ldap_group,unix_group,wbinfo_group
' '--enable-auth=basic,digest,ntlm'
'--enable-digest-auth-helpers=password' '--w
ith-winbind-auth-challenge' '--enable-useragent-log'
'--enable-referer-log' '--d
isable-dependency-tracking' '--enable-cachemgr-hostname=localhost'
'--enable-und
erscores'
'--enable-basic-auth-helpers=LDAP,MSNT,NCSA,PAM,SMB,YP,getpwnam,multi-
domain-NTLM,SASL' '--enable-cache-digests' '--enable-ident-lookups'
'--with-larg
e-files' '--enable-follow-x-forwarded-for' '--enable-wccpv2'
'--enable-fd-config
' '--with-maxfd=16384' 'build_alias=i386-redhat-linux-gnu'
'host_alias=i386-redh
at-linux-gnu' 'target_alias=i386-redhat-linux-gnu' 'CFLAGS=-fPIE -Os -g
-pipe -f
signed-char' 'LDFLAGS=-pie'
===>Here's the first part of /etc/init.d/squid :
#!/bin/bash
# squid This shell script takes care of starting and stopping
# Squid Internet Object Cache
#
# chkconfig: - 90 25
# description: Squid - Internet Object Cache. Internet object caching is \
# a way to store requested Internet objects (i.e., data available \
# via the HTTP, FTP, and gopher protocols) on a system closer to the
\
# requesting site than to the source. Web browsers can then use the
\
# local Squid cache as a proxy HTTP server, reducing access time as
\
# well as bandwidth consumption.
# pidfile: /var/run/squid.pid
# config: /etc/squid/squid.conf
#set -x
PATH=/usr/bin:/sbin:/bin:/usr/sbin
export PATH
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
# check if the squid conf file is present
[ -f /etc/squid/squid.conf ] || exit 0
if [ -f /etc/sysconfig/squid ]; then
. /etc/sysconfig/squid
fi
==> Here is my /etc/services with 3128 defined to be for squid
[root at schoolserver etc]# grep -B4 -A4 "3128" /etc/services
ninstall 2150/tcp # ninstall service
ninstall 2150/udp # ninstall service
afbackup 2988/tcp # Afbackup system
afbackup 2988/udp # Afbackup system
squid 3128/tcp # squid web proxy
prsvp 3455/tcp # RSVP Port
prsvp 3455/udp # RSVP Port
distcc 3632/tcp # distcc
svn 3690/tcp # Subversion
==> When I look for 3128 in HTTPD land, I get this:
[root at schoolserver etc]# cd httpd
[root at schoolserver httpd]# grep -R "3128" /etc/httpd
grep: /etc/httpd/run/dbus/system_bus_socket: No such device or address
grep: /etc/httpd/run/avahi-daemon/socket: No such device or address
/etc/httpd/conf/httpd.conf:Listen 3128
==> Here are the relevant lines of the HTTPD configuration:
[root at schoolserver conf]# grep -B11 "3128" /etc/httpd/conf/httpd.conf
#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 80
Listen 3128
==> I added a "#" to comment out the Listen 3128 and that seems to fix the
problem. I got
"[OK]" on manually restarting Apache and squid, and it also starts on boot
now.
[root at schoolserver conf]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root at schoolserver conf]# service squid start
Starting squid: . [ OK ]
[root at schoolserver conf]#
Perhaps Wad should make these changes part of the next XS LiveCD build?
Tony Pearson
Senior Storage Consultant, IBM System Storage?
Telephone: +1 520-799-4309 | tie 321-4309 | Cell: +1 520 990-8669
email: tpearson at us.ibm.com | GSA: http://tucgsa.ibm.com/~tpearson
Blog: http://www.ibm.com/developerworks/blogs/page/InsideSystemStorage
AKA: 990tony Paravane, eightbar specialist
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.laptop.org/pipermail/server-devel/attachments/20080210/d414f831/attachment.htm
More information about the Server-devel
mailing list