# yum install -y squid httpd-tools
# vi /etc/squid/squid.conf
visible_hostname your.host.name
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd
(用 #rpm -ql squid | grep ncsa_auth 找出路徑 )
acl kkkkk src 123.456.789.0/24
acl all_networks src all
acl password proxy_auth REQUIRED
http_access allow kkkkk
http_access allow password
http_access allow all_networks
# htpasswd -c /etc/squid/passwd user_name
# squid -z
# /etc/init.d/squid restart
# crontab -e
0 0 * * * /etc/init.d/squid stop;echo " " > /var/spool/squid/swap.state;/etc/init.d/squid start
沒有留言:
張貼留言