squid 2.5.STABLE9 anchor.png Edit

  • インストール

以下のサイトよりファイルをダウンロード
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

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   ページ新規作成 全ページ一覧 単語検索 最新ページの一覧   ヘルプ   最新ページのRSS 1.0 最新ページのRSS 2.0 最新ページのRSS Atom
Counter: 569, today: 1, yesterday: 0
最終更新: 2008-11-26 (水) 02:34:30 (JST) (1272d) by aqua
オススメ

おすすめ
カレンダ
前月2012年 5月翌月
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
<今日>
ログイン
ユーザ名:

パスワード:



パスワード紛失

新規登録
天気予報

資料提供天気予報コム
アクセスカウンタ
今日 : 161161161
昨日 : 577577577
総計 : 363715363715363715363715363715363715