squid源码安装、使用、优化、实例

squid源码安装、使用、优化、实例

#社博论

http://www.codesky.net/article/200805/119557.html

#3.5版本yum默认安装的配置文件如下:

‘–build=x86_64-redhat-linux-gnu’

‘–host=x86_64-redhat-linux-gnu’

‘–target=x86_64-redhat-linux-gnu’

‘–program-prefix=’

‘–prefix=/usr’

‘–exec-prefix=/usr’

‘–bindir=/usr/bin’

‘–sbindir=/usr/sbin’

‘–sysconfdir=/etc’

‘–datadir=/usr/share’

‘–includedir=/usr/include’

‘–libdir=/usr/lib64’

‘–libexecdir=/usr/libexec’

‘–sharedstatedir=/var/lib’

‘–mandir=/usr/share/man’

‘–infodir=/usr/share/info’

‘–verbose’ ‘–exec_prefix=/usr’

‘–libexecdir=/usr/lib64/squid’

‘–localstatedir=/var’

‘–datadir=/usr/share/squid’

‘–sysconfdir=/etc/squid’

‘–with-logdir=$(localstatedir)/log/squid’

‘–with-pidfile=$(localstatedir)/run/squid.pid’

‘–disable-dependency-tracking’

‘–enable-follow-x-forwarded-for’

‘–enable-auth’

‘–enable-auth-basic=DB,LDAP,NCSA,NIS,PAM,POP3,RADIUS,SASL,SMB,getpwnam’

‘–enable-auth-ntlm=smb_lm,fake’

‘–enable-auth-digest=file,LDAP’

‘–enable-auth-negotiate=kerberos,wrapper’

‘–enable-external-acl-helpers=wbinfo_group,kerberos_ldap_group’

‘–enable-cache-digests’

‘–enable-cachemgr-hostname=localhost’

‘–enable-delay-pools’

‘–enable-epoll’

‘–enable-icap-client’

‘–enable-ident-lookups’

‘–enable-linux-netfilter’

‘–enable-removal-policies=heap,lru’

‘–enable-snmp’

‘–enable-storeio=aufs,diskd,ufs,rock’

‘–enable-wccpv2’

‘–enable-esi’

‘–enable-ssl-crtd’

‘–enable-icmp’

‘–with-aio’

‘–with-default-user=squid’

‘–with-filedescriptors=16384’

‘–with-dl’

‘–with-openssl’

‘–with-pthreads’

‘–with-included-ltdl’

‘–disable-arch-native’

‘–without-nettle’

‘build_alias=x86_64-redhat-linux-gnu’

‘host_alias=x86_64-redhat-linux-gnu’

‘target_alias=x86_64-redhat-linux-gnu’

‘CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic’

‘CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC’

‘PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig’ –enable-ltdl-convenience

#源码安装:

#编译设置:

#安装依赖

yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel cURL cURL-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel

#编译配置:

./configure –prefix=/usr/local/squid3.0 \

–enable-async-io=100 \

–with-pthreads \

–enable-storeio=”aufs,diskd,ufs” \

–enable-removal-polioies=”heap,lru” \

–enable-icmp \

–enable-delay-pools \

–enable-useragent-log \

–enable-referer-log \

–enable-kill-parent-hack \

–enable-cachemgr-hostname=localhost \

–enable-arp-acl \

–enable-default-err-language=English \

–enable-err-languages=”Simplify_Chinese English” \

–disable-poll \

–disable-wccp \

–disable-wccpv2 \

–disable-ident-lookups \

–disable-internal-dns \

–enable-basic-auth-helpers=”NCSA” \

–enable-stacktrace \

–with-filedscriptors=64000 \

–enable-ssl \

–enable-x-accelerator-vary \

–disable-snmp \

–with-aio

————–以下为选择项————————

–enable-linux-netfilter \

–enable-linux-tproxy \

#内核配置

options         MSGMNB=8192     # max # of bytes in a queue
options         MSGMNI=40       # number of message queue identifiers
options         MSGSEG=512      # number of message segments per queue
options         MSGSSZ=64       # size of a message segment
options         MSGTQL=2048     # max messages in system
options SHMSEG=16
options SHMMNI=32
options SHMMAX=2097152
options SHMALL=4096
options MAXFILES=16384

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值