标签:ges tproxy 完成后 uid usr www filter img 互联网
反向代理优点服务器 | 操作系统 | IP地址 | 软件 |
---|---|---|---|
squid反向代理 | centos7.3 x86_64 | 192.168.144.112 | squid-4.1 |
web1 | centos7.3 x86_64 | 192.168.144.113 | httpd |
web2 | centos7.3 x86_64 | 192.168.144.111 | httpd |
tar zxvf squid-4.1.tar.gz -C /opt/
cd /opt/squid-4.1
./configure --prefix=/usr/local/squid --sysconfdir=/etc --enable-arp-acl --enable-linux-netfilter --enable-linux-tproxy --enable-async-io=100 --enable-err-language="Simplify_Chinese" --enable-underscore --enable-poll --enable-gnuregex
make && make install
ln -s /usr/local/squid/sbin/* /usr/local/sbin/useradd -M -s /sbin/nologin squid
chown -R squid.squid /usr/local/squid/var/
vim /etc/squid.conf
http_port 192.168.144.112:80 accel vhost vport //此处squid做httpd代理,端口需要修改成80端口,accel表示启用加速功能
cache_peer 192.168.144.113 parent 80 0 no-query originserver round-robin max_conn=30 weight=1 name=web1 //两个web节点服务器地址,采用轮询rr机制,最大连接数30,权重为1
cache_peer 192.168.144.111 parent 80 0 no-query originserver round-robin max_conn=30 weight=1 name=web2
cache_peer_domain web1 web2 www.yun.com //主机域名设定
squid -k parse //检测配置文件
squid -z //初始化
squid //启动服务
标签:ges tproxy 完成后 uid usr www filter img 互联网
原文地址:http://blog.51cto.com/13659253/2152898