RedisLive installation configuration

Posted by free2code on Sat, 02 May 2020 08:38:18 +0200

Installation environment: CentOS release 6.5 (Final) 64 bit

1. Install Python
Python 2.6 comes with CentOS, but pip does not support this version. You need to upgrade Python to 2.7 first, and python 2.6 is required for yum, so Python needs to coexist with 2.6 and 2.7

# Install compilation tools and dependency Libraries
yum groupinstall 'Development tools'
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel

# Installing Python 2.7
unxz Python-2.7.14.tar.xz
tar xvf Python-2.7.14.tar.xz
cd Python-2.7.14
make altinstall

At this time, python 2.6 is used to execute Python 2.6 and python 2.7

2. Install the pip dependency tool setuptools

cd setuptools-38.4.0
python2.7 install

Perform easy install test installation, if it appears

error: No urls, filenames, or requirements specified (see --help)

Installation succeeded

3. Install pip

tar zxvf pip-9.0.1.tar.gz
cd pip-9.0.1
python2.7 install

If last output

Finished processing dependencies for pip==1.5.5

Installation is complete

4. Install RedisLive dependencies

# Install the web server tornado in Python
pip install tornado
# Install the Python SDK of redis
pip install redis
# Installation time tool
pip install python-dateutil

root permission is required for installation here. Otherwise, an error is reported. The information is as follows:

error: could not create '/usr/lib/python2.7/site-packages/backports': Permission denied

5. Install RedisLive

RedisLive source address:

# Download and unzip

# To configure
cd RedisLive-master/src
cp redis-live.conf.example redis-live.conf

RedisLive profile is as follows:

                        "server": "",
                        "port" : 6379

                        "server": "localhost",
                        "port" : 6380,
                        "password" : "some-password"

        "DataStoreType" : "redis",

                "server" : "",
                "port" : 6385

        "SqliteStatsStore" :
                "path":  "to your sql lite file"

The whole configuration is a json object, in which RedisServers are the redis server information to be monitored, and there can be multiple; DataStoreType is the storage mode of monitoring information, and the options are redis and sqlite, respectively corresponding to RedisStatsServer and SqliteStatsStore

6. Start service

Turn off the firewall before starting the service, otherwise you will not be able to access the web page

# Start monitoring, duration specifies the heartbeat time
python2.7 --duration=30 &
# Start web service, default port is 8888
python2.7 &

It can be accessed through browser after startup http://ip:8888/index.html View monitoring information

reference material:

Upgrade Python's pit on CentOS
Install setuptools and pip
RedisLive: a graphical monitoring tool for redis operation status
Monitoring Redis cluster service with RedisLive
Redis live - RedisLive

Topics: Python Redis pip CentOS