In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to install RedisLive monitoring tools. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
1. Install python2.7.5 and pip
Http://blog.itpub.net/30089851/viewspace-2132450/
two。 Download RedisLive
[root@sht-sgmhadoopdn-04 app] # wget https://github.com/nkrode/RedisLive/archive/master.zip
[root@sht-sgmhadoopdn-04 app] # unzip master
[root@sht-sgmhadoopdn-04 app] # mv RedisLive-master RedisLive
[root@sht-sgmhadoopdn-04 app] # cd RedisLive/
[root@sht-sgmhadoopdn-04 RedisLive] # ll
Total 20
Drwxr-xr-x 2 root root 4096 Aug 20 2015 design
-rw-r--r-- 1 root root 1067 Aug 20 2015 MIT-LICENSE.txt
-rw-r--r-- 1 root root 902 Aug 20 2015 README.md
-rw-r--r-- 1 root root 58 Aug 20 2015 requirements.txt
Drwxr-xr-x 7 root root 4096 Aug 20 2015 src
[root@sht-sgmhadoopdn-04 RedisLive] #
3. Check the version requirements (you didn't pay attention to the version at the beginning of the installation, but pip directly caused all kinds of problems, so please take a closer look at the following process)
[root@sht-sgmhadoopdn-04 RedisLive] # cat requirements.txt
Argparse==1.2.1
Python-dateutil==1.5
Redis
Tornado==2.1.1
[root@sht-sgmhadoopdn-04 RedisLive] # cd.. /
4.pip installation environment requirements
[root@sht-sgmhadoopdn-04 app] # pip install tornado
[root@sht-sgmhadoopdn-04 app] # pip install redis
[root@sht-sgmhadoopdn-04 app] # pip install python-dateutil
[root@sht-sgmhadoopdn-04 app] # pip install argparse
5. Enter the / root/learnproject/app/RedisLive/src directory and configure the redis-live.conf file
[root@sht-sgmhadoopdn-04 app] # cd-
/ root/learnproject/app/RedisLive
[root@sht-sgmhadoopdn-04 RedisLive] # cd src
[root@sht-sgmhadoopdn-04 src] # ll
Total 40
Drwxr-xr-x 4 root root 4096 Aug 20 2015 api
Drwxr-xr-x 2 root root 4096 Aug 20 2015 dataprovider
Drwxr-xr-x 2 root root 4096 Aug 20 2015 db
-rw-r--r-- 1 root root 0 Aug 20 2015 _ _ init__.py
-rw-r--r-- 1 root root 381 Aug 20 2015 redis-live.conf.example
-rwxr-xr-x 1 root root 1343 Aug 20 2015 redis-live.py
-rwxr-xr-x 1 root root 9800 Aug 20 2015 redis-monitor.py
Drwxr-xr-x 2 root root 4096 Aug 20 2015 util
Drwxr-xr-x 4 root root 4096 Aug 20 2015 www
You have mail in / var/spool/mail/root
[root@sht-sgmhadoopdn-04 src] #
[root@sht-sgmhadoopdn-04 src] # cp redis-live.conf.example redis-live.conf
[root@sht-sgmhadoopdn-04 src] #
[root@sht-sgmhadoopdn-04 src] # vi redis-live.conf
{
"RedisServers":
[
{
"server": "172.16.101.66"
"port": 6379
}
]
"DataStoreType": "redis"
"RedisStatsServer":
{
"server": "172.16.101.66"
"port": 6379
}
}
~
6. First attempt to start redis-monitor.py throw error _ sqlite3
[root@sht-sgmhadoopdn-04 src] #. / redis-monitor.py-- duration
ImportError: No module named _ sqlite3
[root@sht-sgmhadoopdn-04 src] # yum install-y sqlite-devel
[root@sht-sgmhadoopdn-04 src] # yum install-y sqlite
[root@sht-sgmhadoopdn-04 ~] # find /-name _ sqlite3.so
/ usr/local/python27/lib/python2.7/lib-dynload/_sqlite3.so
/ usr/local/Python-2.7.5/build/lib.linux-x86_64-2.7/_sqlite3.so
/ usr/lib64/python2.6/lib-dynload/_sqlite3.so
[root@sht-sgmhadoopdn-04 ~] # cp / usr/local/python27/lib/python2.7/lib-dynload/_sqlite3.so / usr/local/lib/python2.7/lib-dynload/
[root@sht-sgmhadoopdn-04 ~] # python
Python 2.7.5 (default, Sep 17 2016, 15:34:31)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
> import sqlite3
> > >
Reference: http://ju.outofmemory.cn/entry/97658
7. Second attempt to start redis-monitor.py throwing error redis
[root@sht-sgmhadoopdn-04 src] #. / redis-monitor.py-- duration
ImportError: No module named redis
[root@sht-sgmhadoopdn-04 src] # find /-name redis
/ etc/rc.d/init.d/redis
/ root/learnproject/app/redis
/ root/learnproject/app/redis-monitor/src/main/java/sun/redis
/ root/learnproject/app/redis-monitor/src/test/java/sun/redis
/ usr/local/redis
/ usr/local/python27/lib/python2.7/site-packages/redis
[root@sht-sgmhadoopdn-04 src] #
[root@sht-sgmhadoopdn-04 src] # cp-r / usr/local/python27/lib/python2.7/site-packages/redis / usr/local/lib/python2.7/lib-dynload/
[root@sht-sgmhadoopdn-04 src] # python
Python 2.7.5 (default, Sep 17 2016, 15:34:31)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
> import redis
> > >
8. The third attempt to start redis-monitor.py is successful; press ctrl+c to interrupt
[root@sht-sgmhadoopdn-04 src] #. / redis-monitor.py-- duration
^ Cshutting down...
You have mail in / var/spool/mail/root
[root@sht-sgmhadoopdn-04 src] #
9. Try to start redis-live.py, tornado.ioloop for the first time
[root@sht-sgmhadoopdn-04 src] #. / redis-live.py
Traceback (most recent call last):
File ". / redis-live.py", line 3, in
Import tornado.ioloop
ImportError: No module named tornado.ioloop
[root@sht-sgmhadoopdn-04 src] # find /-name tornado
/ usr/local/python27/lib/python2.7/site-packages/tornado
[root@sht-sgmhadoopdn-04 src] # cp-r / usr/local/python27/lib/python2.7/site-packages/tornado / usr/local/lib/python2.7/lib-dynload/
10. Try to start redis-live.py, singledispatch for the second time
[root@sht-sgmhadoopdn-04 src] #. / redis-live.py
Traceback (most recent call last):
File ". / redis-live.py", line 6, in
Import tornado.web
File "/ usr/local/lib/python2.7/lib-dynload/tornado/web.py", line 84, in
From tornado import gen
File "/ usr/local/lib/python2.7/lib-dynload/tornado/gen.py", line 98, in
From singledispatch import singledispatch # backport
ImportError: No module named singledispatch
# this singledispatch error is actually in tornado. After thinking about it, Google suspected that it was a version problem, so decisively uninstalled tornado.
[root@sht-sgmhadoopdn-04 src] # pip uninstall tornado
[root@sht-sgmhadoopdn-04 src] # rm-rf / usr/local/lib/python2.7/lib-dynload/tornado
[root@sht-sgmhadoopdn-04 src] # find /-name tornado
[root@sht-sgmhadoopdn-04 src] #
# # if find is available, delete it manually
11. So think about the other things that need to be uninstalled.
[root@sht-sgmhadoopdn-04 src] # pip uninstall argparse
[root@sht-sgmhadoopdn-04 src] # pip uninstall python-dateutil
[root@sht-sgmhadoopdn-04 src] # find /-name argparse
[root@sht-sgmhadoopdn-04 src] # find /-name python-dateutil
# # if find is available, delete it manually
twelve。 Key step: install according to the specified version of step3
[root@sht-sgmhadoopdn-04 src] # pip install-v tornado==2.1.1
[root@sht-sgmhadoopdn-04 src] # pip install-v argparse==1.2.1
[root@sht-sgmhadoopdn-04 src] # pip install-v python-dateutil==1.5
13. Try to start redis-live.py again and throw the wrong dateutil.parser
[root@sht-sgmhadoopdn-04 src] #. / redis-live.py
Traceback (most recent call last):
File ". / redis-live.py", line 10, in
From api.controller.ServerListController import ServerListController
File "/ root/learnproject/app/RedisLive/src/api/controller/ServerListController.py", line 1, in
From BaseController import BaseController
File "/ root/learnproject/app/RedisLive/src/api/controller/BaseController.py", line 4, in
Import dateutil.parser
ImportError: No module named dateutil.parser
[root@sht-sgmhadoopdn-04 src] #
[root@sht-sgmhadoopdn-04 src] #
[root@sht-sgmhadoopdn-04 src] #
[root@sht-sgmhadoopdn-04 src] #
[root@sht-sgmhadoopdn-04 src] # find /-name dateutil
/ usr/local/python27/lib/python2.7/site-packages/dateutil
[root@sht-sgmhadoopdn-04 src] # cp-r / usr/local/python27/lib/python2.7/site-packages/dateutil / usr/local/lib/python2.7/lib-dynload/
You have mail in / var/spool/mail/root
14. Try to start redis-live.py again, succeed, and then press ctrl+c to interrupt.
[root@sht-sgmhadoopdn-04 src] #. / redis-live.py
^ CTraceback (most recent call last):
File ". / redis-live.py", line 36, in
Tornado.ioloop.IOLoop.instance () .start ()
File "/ usr/local/lib/python2.7/lib-dynload/tornado/ioloop.py", line 283, in start
Event_pairs = self._impl.poll (poll_timeout)
KeyboardInterrupt
[root@sht-sgmhadoopdn-04 src] #
15. Start
[root@sht-sgmhadoopdn-04 src] # / redis-monitor.py-- duration 120 &
[root@sht-sgmhadoopdn-04 src] #. / redis-live.py &
Open the web interface
Http://172.16.101.66:8888/index.html
Thank you for reading! This is the end of the article on "how to install RedisLive monitoring tools". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.