First, the environment
System CentOS 6.4x64 Minimized installation
IP 192.168.1.11
Second, install Squid
Download package
[Email protected] ~]# wget http://www.squid-cache.org/Versions/v3/3.0/squid-3.0.STABLE20.tar.gz
Installation
[[email protected] ~]# tar xf squid-3.0.stable20.tar.gz [[email protected] ~]# cd squid-3.0.stable20# set open maximum number of files [[email protected] squid-3.0.stable20]# ulimit -hn 20480[[email protected] squid-3.0.stable20]# echo "ulimit -hn 20480 " >>/etc/rc.local #设置端口范围 [[email protected] squid-3.0.stable20]# echo "net.ipv4.ip_local_port_range = 4000 65000" >>/etc/sysctl.conf [[email protected] squid-3.0.stable20]# sysctl -p |grep port_ rangenet.ipv4.ip_local_port_range = 4000 65000[[email protected] 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# Note in the Make phase if you report an error about SSL, please install Yum install openssl-devel and re-./configure[[email protected] Squid-3.0.stable20]# make[[email protected] squid-3.0.stable20]# make install[[email protected] squid-3.0.stable20]# ln -s /usr/local/squid3.0/ /usr/local/squid[[ email protected] squid-3.0.stable20]# ll /usr/local/ |grep squidlrwxrwxrwx 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
This article is from the "ly36843" blog, please be sure to keep this source http://ly36843.blog.51cto.com/3120113/1676190
CentOS 6.4 Installation Configuration Squid