Linux: August 2011 Archives

XCache 1.3.2

user-pic
Vote 0 Votes

XCache 1.3.2 Release date: 2011-06-04

Apache in /usr/local/apache
php.ini in /usr/local/etc/php.ini

wget http://xcache.lighttpd.net/pub/Releases/1.3.2/xcache-1.3.2.tar.bz2
tar jxf xcache-1.3.2.tar.bz2
cd xcache-1.3.2
phpize --clean
phpize
./configure --enable-xcache --with-php-config=/usr/local/bin/php-config
make
make install
cat xcache.ini >> /usr/local/etc/php.ini

edit /usr/local/etc/php.ini
zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-20060613/xcache.so
xcache.size = 64M

xcache.so path may different from yours

To check if XCache enabled

# php -i |grep XCache
with XCache v1.3.2, Copyright (c) 2005-2011, by mOo
XCache
XCache Support => enabled

PHREL - Per Host RatE Limiter

user-pic
Vote 0 Votes

PHREL - Per Host RatE Limiter 是 iptables 的輔助工具,
它可以統計單一 Host 的每秒的連線數(PPS - Packets Per Second), 並設條件自動新增 iptables rule 來達到 rate limit 效果,
時間到了會自動刪除 rule, 預設 decay 時間為 15 分鐘, 可以用 -D 參數調整,
可以應用在很多地方

For HTTP Server
限制 HTTP 線程若超過 10 限制為 4, 持續限制時間 15 分鐘(預設值)
phreld -P tcp -p 80 -T10:4

For DNS Server
DNS 每秒 query 數若達 50, 限為 2, 若達 100, 限為 2, 持續限制時間十分鐘
phreld -P udp -p 53 -T50:5 -T100:2 -D 600

About this Archive

This page is an archive of entries in the Linux category from August 2011.

Linux: July 2011 is the previous archive.

Linux: September 2011 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Linux: Monthly Archives

Monthly Archives