正向代理: Squid 后面是客户端 客户端上网要通过 Squid 去上
反向代理: Squid 后面是服务器 服务器返回给用户数据需要走 Squid
Squid 安装 yum 安装
安装包: yum install -y squid-3.1.10-19.el6_4.i686
注: CentOS 系统自带 Squid 包
源码包安装
下载地址: http://www.squid-cache.org/
1, 解压安装包
tar -xvzf 压缩文件
2, 进入目录下编译安装
./configure --prefix=/usr/local/squid --disable-dependency-tracking --enable-dlmalloc --enable-gnuregex --disable-carp --enable-async-io=240 --with-pthreads --enable-storeio=ufs,aufs,diskd,null --disable-wccp --disable-wccpv2 --enable-kill-parent-hack --enable-cachemgr-hostname=localhost --enable-default-err-language=Simplify_Chinese --with-build-environment=POSIX_V6_ILP32_OFFBIG --with-maxfd=65535 --with-aio --disable-poll --enable-epoll --enable-linux-netfilter --enable-large-cache-files --disable-ident-lookups --enable-default-hostsfile=/etc/hosts --with-dl --with-large-files --enable-removal-policies=heap,lru --enable-delay-pools --enable-snmp --disable-internal-dns
编译参数
make &&make install
Sqiud 常用操作
测试配置文件: squid -kcheck
读取配置文件: squid -krec
获取 squid 帮助信息: squid -h
来源: http://www.bubuko.com/infodetail-2485572.html