ubuntu 9.0.4
1) 安裝
遇到問題
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
解決:
重新編譯 ok
2)配置
在${squid_home}/etc/squid.cof中加入
驗證配置
3)生成緩存目錄
默認會在${squid_home}/var/cache下生成一堆目錄
4)啓動
發現問題:
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.
解決:
再次啓動,發現問題:
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.
解決:
再次仍然問題
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.
解決
上面的問題非常類似,總結一下:
squid起來之後會有一個父進程,和1個或者多個工作進程,這些工作進程會讀寫access.log和store.log以及cache目錄
而父進程會讀寫cache.log
5)從頁面訪問
http://127.0.0.1
發現問題:
403
解決:
於是修改配置文件,
將http_access deny all改爲
再次訪問ok
6)清除緩存
發現問題
403
解決