天天看點

安裝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

#3 測試

>>import sqlite3

/usr/local/python2/bin/ngxtop -h

本文轉自cloves 51CTO部落格,原文連結:http://blog.51cto.com/yeqing/1655163

上一篇: NAT詳解