標籤:centos 6.4安裝配置squid
一、環境
系統 CentOS 6.4x64迷你安裝
IP 192.168.1.11
二、安裝squid
下載軟體包
[[email protected] ~]# wget http://www.squid-cache.org/Versions/v3/3.0/squid-3.0.STABLE20.tar.gz
安裝
[[email protected] ~]# tar xf squid-3.0.STABLE20.tar.gz [[email protected] ~]# cd squid-3.0.STABLE20#設定開啟最大檔案數目[[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#注在make階段如果報關於ssl的錯誤,請安裝yum install openssl-devel後重新./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
本文出自 “ly36843營運” 部落格,請務必保留此出處http://ly36843.blog.51cto.com/3120113/1676190
CentOS 6.4安裝配置squid