zqfHBphp
Php Page execution statistics extension
因爲依賴hiredis的c的api調用redis,因此首先須要安裝hiredis
wget https://github.com/redis/hire...
tar zxvf v0.13.3.tar.gz
cd hiredis-0.13.3
make
或者直接make install,建議手動按下面配置
mkdir -p /usr/local/include/hiredis /usr/local/lib
cp -a hiredis.h async.h read.h sds.h adapters /usr/local/include/hiredis
cp -a libhiredis.so /usr/local/lib/libhiredis.so.0.13
cd /usr/local/lib && ln -sf libhiredis.so.0.13 libhiredis.so
切換到cd hiredis-0.13.3目錄下
cp -a libhiredis.a /usr/local/lib
mkdir -p /usr/local/lib/pkgconfig
cp -a hiredis.pc /usr/local/lib/pkgconfig
若是出現libhiredis.so.0.13: cannot open shared object file: No such file or directory in Unknown on line 0
vi /etc/ld.so.conf
文件末尾添加 /usr/local/lib
而後執行ldconfig
下面安裝本擴展
./phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make
make install
add zqfHB.so to php.ini
extension=zqfHB.so
[zqfHB]
zqfHB.slow_maxtime=10000(單位微妙1s=1000000us,改參數是頁面加載超過這個時間會統計)
zqfHB.type=1(1表明redis 2表明memcache,因爲memcache性能處理有點低,暫時不開放)
zqfHB.auth=123456(若是redis沒有密碼,此項沒必要配置,若是有密碼,必須配置此項)
zqfHB.host=192.168.102.163
zqfHB.port=6379
use:git
須要把web裏的全部文件複製到網站目錄下,網站統計能夠不在一塊兒
直接執行http://localhost/web/github
效果圖
web