CentOS 6.4安装配置squid
时间:2015-07-22 01:27 来源:linux.it.net.cn 作者:IT
[root@squid ~]
# wget http://www.squid-cache.org/Versions/v3/3.0/squid-3.0.STABLE20.tar.gz
[root@squid ~]
# tar xf squid-3.0.STABLE20.tar.gz
[root@squid ~]
# cd squid-3.0.STABLE20
#设置打开最大文件数目
[root@squid squid-3.0.STABLE20]
# ulimit -Hn 20480
[root@squid squid-3.0.STABLE20]
# echo "ulimit -Hn 20480" >>/etc/rc.local
#设置端口范围
[root@squid squid-3.0.STABLE20]
# echo "net.ipv4.ip_local_port_range = 4000 65000" >>/etc/sysctl.conf
[root@squid squid-3.0.STABLE20]
# sysctl -p |grep port_range
net.ipv4.ip_local_port_range = 4000 65000
[root@squid squid-3.0.STABLE20]
# ./configure --prefix=/usr/local/squid3.0 \
> --
enable
-async-io=100 \
> --with-pthreads \
> --
enable
-storeio=
"aufs,diskd,ufs"
\
> --
enable
-removal-policiles=
"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-pool \
> --disable-wccp \
> --disable-wccpv2 \
> --disable-ident-lookups \
> --disable-internal-dns \
> --
enable
-basic-auth-helpers=
"NSCA"
\
#在编译的时候这个选项报错,ERROR: Basic auth helper NSCA does not exists
> --
enable
-stacktrace \
> --with-large-files \
> --disable-mempools \
> --with-filedescriptors=64000 \
> --
enable
-ssl \
> --
enable
-x-accelerator-vary \
> --disable-snmp \
> --with-aio \
> --
enable
-linux-netfilter \
> --
enable
-linux-tproxy
#注在make阶段如果报关于ssl的错误,请安装yum install openssl-devel后重新./configure
[root@squid squid-3.0.STABLE20]
# make
[root@squid squid-3.0.STABLE20]
# make install
[root@squid squid-3.0.STABLE20]
# ln -s /usr/local/squid3.0/ /usr/local/squid
[root@squid squid-3.0.STABLE20]
# ll /usr/local/ |grep squid
lrwxrwxrwx 1 root root 20 Jul 19 22:09 squid ->
/usr/local/squid3
.0/
drwxr-xr-x 8 root root 4096 Jul 19 22:06 squid3.0
(责任编辑:IT)
(责任编辑:IT) |