环境:centos6.5
eth0:192.168.10.1/24
编译安装squid
21 tar -zxvf squid-3.4.6.tar.gz -C /usr/src/
22 cd /usr/src/
23 ls 24 cd ./squid-3.4.6/
25 ls
26 ./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-gunregex
27 make && make install
28 ln -s /usr/local/squid/sbin/* /usr/local/sbin/
29 chown -R squid:squid /usr/local/squid/var/
30 chmod -R 757 /usr/local/squid/var/
31 vim /etc/squid.conf
# # Recommended minimum Access Permission configuration: # # Deny requests to certain unsafe ports http_access allow all http_access deny !Safe_ports # Deny CONNECT to other than secure SSL ports http_access deny CONNECT !SSL_ports
32 squid #启动服务
33 netstat -anpt | grep squid
34 iptables -t -F raw | filter | nat | mangle #清空防火墙规则
echo 'welcome to web server ~~' > /var/www/html/index.html