Install and configure squid in CentOS 6.4
I. Environment
Minimal installation of CentOS 6.4x64
IP 192.168.1.11
Ii. Install squid
Download Software Package
[root@squid~]
#wgethttp://www.squid-cache.org/Versions/v3/3.0/squid-3.0.STABLE20.tar.gz
Install
[root@squid~]
#tarxfsquid-3.0.STABLE20.tar.gz
[root@squid~]
#cdsquid-3.0.STABLE20
# Set the maximum number of opened files
[root@squidsquid-3.0.STABLE20]
#ulimit-Hn20480
[root@squidsquid-3.0.STABLE20]
#echo"ulimit-Hn20480">>/etc/rc.local
# Set the port range
[root@squidsquid-3.0.STABLE20]
#echo"net.ipv4.ip_local_port_range=400065000">>/etc/sysctl.conf
[root@squidsquid-3.0.STABLE20]
#sysctl-p|grepport_range
net.ipv4.ip_local_port_range=400065000
[root@squidsquid-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_ChineseEnglish"
\
>--disable-pool\
>--disable-wccp\
>--disable-wccpv2\
>--disable-ident-lookups\
>--disable-internal-dns\
>--
enable
-basic-auth-helpers=
"NSCA"
\
# This option reports an ERROR during compilation: ERROR: BasicauthhelperNSCAdoesnotexists
>--
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: If ssl errors are declared during the make stage, install yuminstallopenssl-devel and restart./configure.
[root@squidsquid-3.0.STABLE20]
#make
[root@squidsquid-3.0.STABLE20]
#makeinstall
[root@squidsquid-3.0.STABLE20]
#ln-s/usr/local/squid3.0//usr/local/squid
[root@squidsquid-3.0.STABLE20]
#ll/usr/local/|grepsquid
lrwxrwxrwx1rootroot20Jul1922:09squid->
/usr/local/squid3
.0/
drwxr-xr-x8rootroot4096Jul1922:06squid3.0