码迷,mamicode.com
首页 > 其他好文 > 详细

安装ngxtop

时间:2015-05-26 16:32:06      阅读:210      评论:0      收藏:0      [点我收藏+]

标签:安装   ngxtop   

###### 安装ngxtop
wget https://github.com/lebinh/ngxtop/archive/master.zip -O ngxtop-master.zip
unzip ngxtop-master.zip
cd ngxtop-master
python setup.py install
find  / -name ‘ngxtop‘

如果运行中出现 ImportError: No module named _sqlite3 问题解决如下:

#1 安装sqlite
wget http://www.sqlite.org/sqlite-amalgamation-3.6.20.tar.gz
tar zxf sqlite-amalgamation-3.6.20.tar.gz
./configure --prefix=/application/path/

make && make install

#2 重新安装python
cd /application/tools/Python-2.7.8

vi setup.py  修改:
sqlite_inc_paths = [ ‘/usr/include‘,
                             ‘/usr/include/sqlite‘,
                             ‘/usr/include/sqlite3‘,
                             ‘/usr/local/include‘,
                             ‘/usr/local/include/sqlite‘,
                             ‘/usr/local/include/sqlite3‘,
                             ‘/application/sqlite/include‘,
                             ‘/application/sqlite/include/sqlite3‘,
                           ]

./configure --prefix=/usr/local/python2
make && make install

#3 测试
>>import sqlite3
/usr/local/python2/bin/ngxtop -h

本文出自 “技术屌丝” 博客,谢绝转载!

安装ngxtop

标签:安装   ngxtop   

原文地址:http://yeqing.blog.51cto.com/3159086/1655163

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!