Redis監控軟體RedisLive安裝
環境Debian 64 python 2.7.9
1、安裝pip
sudo apt-get install python-setuptools
sudo easy_install pip
提示以下錯誤
.......
cffi.ffiplatform.VerificationError: importing '/home/hawk/g/f2/local/lib/python2.7/site-packages/cryptography/_Cryptography_cffi_70441dc9x8be47966.so': /home/hawk/g/f2/local/lib/python2.7/site-packages/cryptography/_Cryptography_cffi_70441dc9x8be47966.so:
symbol EC_GFp_nistp521_method, version OPENSSL_1.0.1 not defined in file libcrypto.so.1.0.0 with link time reference
.......
因為缺少openssl和 libssl-dev
apt-get install openssl libssl-dev
2、用pip安裝支援庫
pip install tornado
pip install redis
pip install python-dateutil
3、下載RedisLive包
使用者git clone https://github.com/kumarnitin/RedisLive.git
或者用wget下載zip包都可以
4、配置RedisLive
cd RedisLive/src
vim redis-live.conf
{
"RedisServers":
[
{
"server": "127.0.0.1",
"port" : 6379,
"password" : "111"
}
],
"DataStoreType" : "redis",
"RedisStatsServer":
{
"server" : "127.0.0.1",
"port" : 6379,
"password" : "111"
},
"SqliteStatsStore" :
{
"path": "to your sql lite file"
}
}
PS:需要密碼認證的redis一定寫上密碼,否則執行redis-monitor.py時,會出現死迴圈。
4、執行RedisLive
cd RedisLive/src
./redis-monitor.py --duration 60 &
./redis-live.py &
瀏覽器開啟 http://localhost:8888/index.html
安裝完成