squid 2.5.STABLE9
- インストール
以下のサイトよりファイルをダウンロード
http://www.squid-cache.org/
# cd /usr/local/arch
# wget http://www.squid-cache.org/Versions/v2/2.5/squid-2.5.STABLE9.tar.gz
# cd ../src
# tar xvzf ../arch/squid-2.5.STABLE9.tar.gz
# cd squid-2.5.STABLE9
#./configure --prefix=/usr/local/squid \
--enable-useragent-log \
--enable-referer-log \
--enable-ssl \
--with-openssl=/usr/local/openssl \
--enable-default-err-language=Japanese \
--enable--err-languages=Japanese \
--disable-internal-dns
# make
# make install- リバースプロキシとしての設定
# cd /usr/local/squid # mkdir cache logs # chown squid:squid cache logs # vi squid.conf
http_port 80 cache_dir ufs /usr/local/squid/cache 500 16 16 cache_effective_user squid cache_effective_group squid visible_hostname www.domain.com httpd_accel_host virtual httpd_accel_host 12.34.56.78 httpd_accel_port 8080 httpd_accel_single_host on httpd_accel_with_proxy off cache_mem 10 MB cache_swap_low 90 cache_swap_high 95 maximum_object_size 4096 KB minimum_object_size 0 KB fqdncache_size 1024 pid_filename /usr/local/squid/logs/squid.pid cache_log /usr/local/squid/logs/cache.log cache_access_log /usr/local/squid/logs/access.log cache_store_log /usr/local/squid/logs/store.log cache_replacement_policy LFUDA refresh_pattern . 30 100% 30 negative_ttl 1 minutes memory_pools on acl purge method PURGE acl localhost src 127.0.0.1/255.255.255.255 acl all src 0.0.0.0/0.0.0.0 http_access allow purge localhost http_access deny purge all http_access allow all emulate_httpd_log on logfile_rotate 10000
- 起動と終了
# /usr/local/squid/bin/RunAccel # /usr/local/squid/sbin/squid -k shutdown
- access.logのcombined化
以下のURLよりパッチをダウンロード
http://www.squid-cache.org/mail-archive/squid-dev/200301/att-0164/
# cd /usr/local/src/squid-2.5.STABLE9 # wget http://www.squid-cache.org/.../squid-2.5.STABLE1-combined-logs.patch # cd src # patch -p0 < ../squid-2.5.STABLE1-combined-logs.patch
で、再インストール。
※但し、完全にcombinedのログになってしまうので注意。
- TIPS
- キャッシュの削除
# /usr/local/bin/squidclient -p 80 -m purge /
- キャッシュの削除
- ログのローテート
# /usr/local/bin/squid -k rotate
- ログのローテート
Counter: 569,
today: 1,
yesterday: 0
最終更新: 2008-11-26 (水) 02:34:30 (JST) (1272d) by aqua
