遇到问题
checking for C++ compiler default output file name...
configure: error: C++ compiler cannot create executables
See `config.log' for more details.
configure: error: ./configure failed for lib/libTrie
解决:
sudo apt-get install g++
重新编译 ok
make && make install
2)配置
在${squid_home}/etc/squid.cof中加入
#配置 squid 为加速模式http_port 80 accel vhost vport #配置反向代理的服务器 ,originserver 参数指明是源服务器,cache_peer 127.0.0.1 parent 8080 0 no-query originserver
验证配置
${squid_home}/sbin/squid – k parse
3)生成缓存目录
${squid_home}/sbin/squid -z
默认会在${squid_home}/var/cache下生成一堆目录
4)启动
sudo ${squid_home}/sbin/squid
发现问题:
squid进程起来了,但很快消失,并有错误日志
FATAL: Cannot open '/home/pwlazy/dev/squid/var/logs/access.log' for writing.
The parent directory must be writeable by the
user 'nobody', which is the cache_effective_user
set in squid.conf.
解决:
sudo chown -R nobody /home/pwlazy/dev/squid/var/logs/access.log
再次启动,发现问题:
FATAL: Cannot open '/home/pwlazy/dev/squid/var/logs/store.log' for writing.
The parent directory must be writeable by the
user 'nobody', which is the cache_effective_user
set in squid.conf.
解决:
sudo chown -R nobody /home/pwlazy/dev/squid/var/logs/store.log
再次仍然问题
2009/11/14 02:31:38| /home/pwlazy/dev/squid/var/cache/00: (13) Permission denied
FATAL: Failed to verify one of the swap directories, Check cache.log
for details. Run 'squid -z' to create swap directories
if needed, or if running Squid for the first time.