lepus3.7 天兔監控安裝手冊 CentOS6.5+mysql5.6

lepus3.7 天兔監控安裝配置手冊 CentOS6.5+mysql5.6php

總體環境html

192.168.1.250爲監控機python

192.168.1.248爲被監控機mysql

 

安裝LAMP環境sql

 

[root@HE3~]#yum install gcc libffi-devel python-devel openssl-devel數據庫

 

[root@HE3~]# yum install urpmi xtermapache

[root@HE3mysqlmtop]# vi /etc/ld.so.confcentos

/usr/lib64瀏覽器

[root@HE3 ~]#/sbin/ldconfig服務器

 

解壓lamp環境包(下載地址見本文最後)

[root@HE3mysqlmtop]# tar xvf lamp_centos64_64_version2.tar.gz -C /usr/local/

該包我已上傳至51cto下載中心:http://down.51cto.com/data/2215658

vi/usr/local/apache/conf/httpd.conf

52行修改成監控機ip Listen 192.168.1.250:80

<Listen 80

---

>Listen 192.168.1.250:80

147行取消註釋

<#LoadModule rewrite_module modules/mod_rewrite.so

---

>LoadModule rewrite_module modules/mod_rewrite.so

190行改成監控機ip

<#ServerName www.example.com:80

---

>ServerName 192.168.1.250:80

199行添加註釋

<     Require all denied

---

>#    Require all denied

248添加index.php

<     DirectoryIndex index.html

---

>     DirectoryIndex index.html index.php

447行取消註釋

<#Include conf/extra/httpd-mpm.conf

---

>Include conf/extra/httpd-mpm.conf

465行取消註釋

<#Include conf/extra/httpd-vhosts.conf

---

>Include conf/extra/httpd-vhosts.conf

 

 

 

 

 

 

vi/usr/local/apache/conf/extra/httpd-vhosts.conf

刪除掉原來的替換爲:

 

<VirtualHost*:80>

    AddDefaultCharset UTF-8

    DocumentRoot "/home/www/php"

    ServerName mysqlmtop1.ikongjian.com

    <Directory "/home/www/php">

        Options FollowSymLinks

        AllowOverride All

        Order allow,deny

        Allow from All

    </Directory>

    ErrorLog"|/usr/local/apache/bin/rotatelogs /home/logs/apache/php_%Y%m%d_error.log86400 480"

    CustomLog"|/usr/local/apache/bin/rotatelogs /home/logs/apache/php_%Y%m%d_access.log86400 480" common

</VirtualHost>

 

 

[root@HE3lepus]# cat /etc/hosts

127.0.0.1   localhost localhost.localdomain

::1         localhost6 localhost6.localdomain6

192.168.1.248   HE1

192.168.1.249   HE2

192.168.1.250   HE3 mysqlmtop1.ikongjian.com

192.168.1.251   HE4

 

 

 

 

 

[root@HE3~]# cd /usr/local/apache/bin/

[root@HE3 bin]#./apachectl start

 

 

 

 

 

安裝Python基礎模塊

wget http://cdn.lepus.cc/cdncache/software/MySQLdb-python.zip

[root@HE3mysqlmtop]# unzip MySQLdb-python.zip

[root@HE3mysqlmtop]# cd MySQLdb1-master/

[root@HE3MySQLdb1-master]# which mysql_config

/usr/local/mysql/bin/mysql_config

 

[root@HE3MySQLdb1-master]# vi site.cfg

mysql_config = /usr/local/mysql/bin/mysql_config

 

[root@HE3MySQLdb1-master]# python setup.py build

[root@HE3MySQLdb1-master]# python setup.py install

 

 

 

 

安裝Lepus採集器

安裝Lepus監控系統

注:在安裝Lepus系統以前,請先根據前面內容安裝LAMP和Python運行基礎環境。

上傳軟件包到監控機服務器並解壓縮軟件到您的系統

# unziplepus_vx.x.x.zip

在監控機建立監控數據庫,並受權。

監控庫

mysql> create database lepus default character set utf8;

mysql> grant select,insert,update,delete,create on lepus.* to 'lepus_user'@'%' identified by'MANAGER';

mysql> flush privileges;

[root@HE3Lepus_v3.8_beta]# mysql -uroot -p lepus < sql/lepus_table.sql

[root@HE3Lepus_v3.8_beta]# mysql -uroot -p lepus < sql/lepus_data.sql

 

mysql>use lepus

mysql>alter tablemysql_status modify column max_connect_errors bigint(18);

mysql>alter tablemysql_status_history modify column max_connect_errors bigint(18);

被監控庫

mysql> grant select,super,process,reload,show databases,replication client on *.* to'lepus_monitor'@'%' identified by 'MANAGER';

mysql> flush privileges;

 

安裝Lpeus程序

進入到Lepus軟件包的python文件夾

# cd python/

授予install.sh可執行權限

# chmod +x install.sh

 

執行安裝

# ./install.sh

 

修改配置文件

進入到安裝目錄,默認爲/usr/local/lepus

[root@HE3~]# vi /usr/local/lepus/etc/config.ini

###監控機MySQL數據庫鏈接地址###

[monitor_server]

host="192.168.1.250"

port=4008

user="lepus_user"

passwd="MANAGER"

dbname="lepus"

 

 

 

 

 

 

重啓lepus進程

/usr/local/lepus/lepusstop

/usr/local/lepus/lepusstart

 

[root@HE3lepus]# tail -f logs/lepus.log

 

 

 

安裝WEB管理臺

進入到你的lepus軟件目錄

[root@HE3 ~]# cd/home/Lepus_v3.8_beta/

[root@HE3Lepus_v3.8_beta]# cp -r php /home/www

 

 

[root@HE3 ~]# vi/home/www/php/application/config/database.php

$db['default']['hostname'] = '192.168.1.250';

$db['default']['port']     = '4008';

$db['default']['username'] = 'lepus_user';

$db['default']['password'] = 'MANAGER';

$db['default']['database'] = 'lepus';

$db['default']['dbdriver'] = 'mysql';

 

登陸進行添加主機和監控

經過瀏覽器輸入mysqlmtop1.ikongjian.com打開監控界面,便可登陸系統。.默認管理員帳號密碼admin/Lepusadmin登陸後請修改管理員密碼,增長普通帳號。

wKiom1cpxQWSse_HAADcGkPAul8414.png


保存後靜候1分鐘,點儀表盤便可出現監控信息

 


wKiom1cpxQahEq3RAAHGL8cx9OE668.png



wKioL1cpxdzCPJPdAADZ_WutFFw306.png


 

本文采用的lamp環境已經上傳好,下載後直接壓縮至/usr/local下便可

http://down.51cto.com/data/2215658

lepus3.7能夠從官網下載

相關文章
相關標籤/搜索