复制配置文件
cp /etc/squid/squid.conf /etc/squid/squid-route.conf
squid运行时发现已经有一个实例,会拒绝启动。所以需要在squid-route.conf里增加
pid_filename /var/run/squid-route.pid
缓存目录也要改成新的
# Uncomment and adjust the following to add a disk cache directory.
cache_dir ufs /var/spool/squid-route 500 16 256
# Leave coredumps in the first cache dir
coredump_dir /var/spool/squid-route
新建个缓存目录并给予squid用户权限
cd /var/spool/
mkdir squid-route/
chown squid squid-route/
chgrp squid squid-route/
检查配置参数是否有错
squid -f /etc/squid/squid-route.conf -k parse
初始化缓存:
squid -f /etc/squid/squid-route.conf -z
http://linux.vbird.org/linux_server/0420squid.php#server_pkg