Squid 3.0 安装

useradd  -d /var/spool/squid -s /sbin/nologin squid

wget http://www.squid-cache.org/Versions/v3/3.0/squid-3.0.STABLE24.tar.gz

tar xzvf squid-3.0.STABLE24.tar.gz 

cd squid-3.0.STABLE24

 

./configure --prefix=/usr/local/squid \

--enable-gnuregex \

--enable-icmp \

--enable-linux-netfilter \

--enable-default-err-language="Simplify_Chinese" \

--enable-kill-parent-hack \

--enable-cache-digests \

--enable-dlmalloc \

--enable-poll \

--enable-async-io=240 \

--enable-delay-pools \

--with-filedescriptors=65536 \

--enable-snmp \

--enable-arp-acl \

--mandir=/usr/share/man/ \

--with-large-files

 

make 

make install 

cd ..

运维命令:

初始化

/usr/local/squid/sbin/squid -zD

启动squid

/usr/local/squid/sbin/squid -D

关闭squid

/usr/local/squid/sbin/squid -k shutdown

重新加载配置

/usr/local/squid/sbin/squid -k reconfigure

 

命中率查看

/usr/local/squid/bin/squidclient -h localhost -p 2000 mgr:info | grep -A 10 "Cache information"

 

1,设置squid自启动。 

echo "/usr/local/squid/sbin/squid -D " >>/etc/rc.local

2, 设置每周二凌晨两点25分自动滚动日志;

echo "25 2 * * 2 root /usr/local/squid/sbin/squid -k rotate " >>/etc/crontab

你可能感兴趣的:(Squid3.0)