安装redis-live:
因为redis-live是基于python开发的,所以首先要部署所需要的python环境
1、安装epel源
wget http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
rpm -ivh epel-release-5-4.noarch.rpm
rpm -ivh epel-release-5-4.noarch.rpm
2、安装python依赖环境
yum install python-pip
pip-python install tornado
pip-python install argparse
pip-python install python-dateutil
或者
yum install tornado
yum install python-dateutil
yum install argparse
pip-python install tornado
pip-python install argparse
pip-python install python-dateutil
或者
yum install tornado
yum install python-dateutil
yum install argparse
3、获取redis-live版本
git clone https://github.com/kumarnitin/RedisLive.git
cd RedisLive/src
vi redis-live.conf
{
"RedisServers":
[
{
"server" : "127.0.0.1",
"port" : 6379
}
],
"DataStoreType" : "redis",
"RedisStatsServer":
{
"server" : "127.0.0.1",
"port" : 6379
}
}
cd RedisLive/src
vi redis-live.conf
{
"RedisServers":
[
{
"server" : "127.0.0.1",
"port" : 6379
}
],
"DataStoreType" : "redis",
"RedisStatsServer":
{
"server" : "127.0.0.1",
"port" : 6379
}
}
RedisServers :redis服务器的配置。
DataStoreType :选择是存储到redis还是sqlite里面
RedisStatsServer:是redis服务器的监控信息可以存放在其他的redis服务器中.也就是RedisStatsServe.
配置好之后,就可以启动服务了。
chmod 777 www 修改web页面权限
./redis-monitor.py –duration 120 &
./redis-live.py &
./redis-monitor.py –duration 120 &
./redis-live.py &
注:启动服务之后,如果访问web页面的话,会在当前终端输出日志,如果不想在终端输出,可以查看redis-live.py的参数
访问:http://ip:8888/index.html
监控效果图
安装报错信息:
1、not found redis module
解决办法
下载:https://codeload.github.com/andymccurdy/redis-py/zip/master
unzip redis-py-master.zip
cd redis-py-master
python setup.py install
cd redis-py-master
python setup.py install
2、pip-python安装tornado和python-dateutil失败解决办法
https://cloud.github.com/downloads/tornadoweb/tornado/tornado-1.2.1.tar.gz
tar zxvf tornado-1.2.1.tar.gz
cd tornado-1.2.1
python setup.py build
python setup.py install
wget http://labix.org/download/python-dateutil/python-dateutil-1.5.tar.gz
tar zxvf python-dateutil-1.5.tar.gz
cd python-dateutil-1.5
python setup.py install
tar zxvf tornado-1.2.1.tar.gz
cd tornado-1.2.1
python setup.py build
python setup.py install
wget http://labix.org/download/python-dateutil/python-dateutil-1.5.tar.gz
tar zxvf python-dateutil-1.5.tar.gz
cd python-dateutil-1.5
python setup.py install