<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                Lepus數據庫監控 == 安裝Python環境 -- 安裝Python基礎模塊 首先安裝Python環境(Python版本要求為Python2.6以上,不支持Python3) 其次安裝數據庫連接Python的驅動包 1.安裝 MySQLdb for python (必須安裝) MySQLdb為Python連接和操作MySQL的類庫,如果您準備使用lepus系統監控MySQL數據庫,那么該模塊必須安裝。 安裝步驟如下: #wget http://cdn.lepus.cc/cdncache/software/MySQLdb-python.zip # unzip MySQLdb-python.zip # cd MySQLdb1-master/ # which mysql_config /usr/local/mysql/bin/mysql_config # vim site.cfg 修改如下: mysql_config = /usr/local/mysql/bin/mysql_config # python setup.py build # python setup.py install 常見錯誤解決: 1).如果編譯python出現如下問題 /usr/bin/ld: cannot find -lpython2.7 collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 請按如下步驟處理: A.檢查并安裝python-devel包 # yum -y install python-devel B.將libpython2.7.so庫文件建立軟連接到/usr/lib下 32位服務器下執行 # ln -s /usr/local/Python2.7/lib/libpython2.7.so /usr/lib/libpython2.7.so 64位服務器下執行 # ln -s /usr/local/Python2.7/lib/libpython2.7.so /usr/lib64/libpython2.7.so C.檢查下/etc/ld.so.conf是否包含/usr/local/Python2.7/lib #vi /etc/ld.so.conf 添加/usr/local/Python2.7/lib #/sbin/ldconfig 2.安裝cx_oracle for python (如果需要監控Oracle則必須安裝) 下載安裝oracle instant client http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html 如果是64位的,請選擇.*x86_64.rpm,否則是.*i386.rpm 如果是oracle 9i或更高,請選擇Instant Client 11,如果是8或8i,請選擇Instant Client 10 [root@westserver software]# rpm -ivh oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm Preparing... ########################################### [100%] 1:oracle-instantclient11.########################################### [100%] [root@westserver software]# rpm -ivh oracle-instantclient11.2-devel-11.2.0.4.0-1.x86_64.rpm Preparing... ########################################### [100%] 1:oracle-instantclient11.########################################### [100%] [root@westserver software]# rpm -ivh oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm Preparing... ########################################### [100%] 1:oracle-instantclient11.########################################### [100%] [root@westserver home]# vim /root/.bash_profile ORACLE_HOME="/usr/lib/oracle/11.2/client64" PATH=$PATH:$ORACLE_HOME/bin export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/local/lib export LD_LIBRARY_PATH 修改完成后重新加載bash_profile文件 [root@westserver cx_Oracle-5.1.2]# source ~/.bash_profile [root@westserver software]# vim /etc/ld.so.conf 加入 /usr/lib/oracle/11.2/client64/lib 執行ldconfig生效 [root@westserver software]# ldconfig 安裝cx_oracle # wget http://cdn.lepus.cc/cdncache/software/cx_Oracle-5.1.2.tar.gz # tar zxvf cx_Oracle-5.1.2.tar.gz # cd cx_Oracle-5.1.2 # python setup.py build # python setup.py install 3.安裝Pymongo for python (如果需要監控Mongodb則必須安裝) pymongo為Python連接和操作MongoDB的類庫,如果您準備使用lepus系統監控MongoDBs數據庫,那么該模塊必須安裝。 安裝步驟如下: # wget http://cdn.lepus.cc/cdncache/software/pymongo-2.7.tar.gz # tar zxvf pymongo-2.7.tar.gz # cd pymongo-2.7 # python setup.py install 4.安裝Redis 驅動 (如果需要監控Redis則必須安裝) # wget http://cdn.lepus.cc/cdncache/software/redis-py-2.10.3.tar.gz # tar zxvf redis-py-2.10.3.tar.gz # cd redis-2.10.3/ # python setup.py install 5.測試各個驅動是否正常運行(非必須) 在lepus的安裝文件包python目錄中,你可以找到如下測試文件,測試上述驅動是否安裝正確。 # python test_driver_mysql.py MySQL python drivier is ok! # python test_driver_oracle.py Oracle python drivier is ok! # python test_driver_mongodb.py MongoDB python drivier is ok! # python test_driver_redis.py Redis python drivier is ok! 安裝Lepus采集器 -- 1)上傳軟件包到監控機服務器并解壓縮軟件到您的系統 # unzip lepus_vx.x.x.zip 2).在監控機創建監控數據庫,并授權。 mysql> create database lepus default character set utf8; mysql> grant select,insert,update,delete,create on lepus.* to 'lepus_user'@'localhost' identified by 'xxxxxx'; mysql> flush privileges; 導入SQL文件夾里的SQL文件(表結構和數據文件) # mysql -uroot –p lepus < sql/lepus_table.sql # mysql -uroot –p lepus < sql/lepus_data.sql 4)安裝Lpeus程序 進入到軟件包的python文件夾 # cd python/ 授予install.sh可執行權限 # chmod +x install.sh 執行安裝 # ./install.sh [note] lepus will be install on basedir: /usr/local/lepus [note] /usr/local/lepus directory does not exist,will be created. [note] /usr/local/lepus directory created success. [note] wait copy files....... [note] change script permission. [note] create links. [note] install complete. 5) 修改配置文件 進入到安裝目錄,默認為/usr/local/lepus # cd /usr/local/lepus/ # vim etc/config.ini ###監控機MySQL數據庫連接地址### [monitor_server] host="127.0.0.1" port=3306 user=" lepus_user " passwd="xxxxxx" dbname="lepus" 6) 啟動Lepus (可選) 此時,你可以執行啟動命令啟動lepus采集進程 [root@ebs-cloud lepus]# lepus start nohup: 把輸出追加到"nohup.out" lepus server start success! 但是因為沒有添加主機,所以查看日志會看到如下提示,屬于正常提示。您也可以在部署完Lepus WEB控制臺后再進行啟動。 [root@ebs-cloud lepus]# tail -f logs/lepus.log 2015-08-03 13:09:09 [WARNING] check mongodb: not found any servers 2015-08-03 13:09:09 [INFO] check mongodb controller finished. 2015-08-03 13:09:12 [INFO] check redis controller started. 2015-08-03 13:09:12 [WARNING] check redis: not found any servers 2015-08-03 13:09:12 [INFO] check redis controller finished. 2015-08-03 13:09:15 [INFO] check os controller started. 2015-08-03 13:09:15 [WARNING] check os: not found any servers 2015-08-03 13:09:15 [INFO] check os controller finished. 2015-08-03 13:09:38 [INFO] alarm controller started. 2015-08-03 13:09:38 [INFO] alarm controller finished. Lepus采集程序安裝完畢! ----------------------- [monitor_server] host="216.189.149.217" port=3306 user="lepus_user" passwd="xxxxxx" dbname="lepus" CREATE USER 'lepus'@'localhost' IDENTIFIED BY '***'; GRANT SUPER ON * . * TO 'lepus'@'localhost' IDENTIFIED BY '***' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ; CREATE USER 'lepus'@'%' IDENTIFIED BY 'xxxxxx'; GRANT SUPER ON * . * TO 'lepus'@'%' IDENTIFIED BY '***' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看