强大的开源企业级数据监控利器Lepus安装与配置管理

前端之家收集整理的这篇文章主要介绍了强大的开源企业级数据监控利器Lepus安装与配置管理前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

开篇介绍

官方网站:http://www.lepus.cc
开源企业级数据库监控系统
简洁、直观、强大的开源数据库监控系统,MysqL/Oracle/MongoDB/Redis一站式性能监控,让数据库监控更简单
Git仓库地址:https://gitee.com/ruzuojun/Lepus

简单介绍:
Lepus(天兔)数据库企业监控系统是一套由专业DBA针对互联网企业开发的一款专业、强大的企业数据库监控管理系统,企业通过Lepus可以对数据库的实时健康和各种性能指标进行全方位的监控。目前已经支持MysqL、Oracle、MongoDB、Redis数据库的全面监控. Lepus可以在数据库出现故障或者潜在性能问题时,根据用户设置及时将数据库的异常进行报警通知数据库管理员进行处理和优化,帮助企业解决数据库性能监控问题,及时发现性能和瓶颈,避免由数据库潜在问题造成的直接经济损失。Lepus能够查看各种实时性能状态指标,并且对监控、性能数据进行统计分析,从运维者到决策者多个层面的视角,查看相关报表。帮助决策者对未来数据库容量进行更好的规划,从而降低了硬件成本。

1.1:安装所需的LAMP环境

1.1.1:下载软件:
Xampp下载地址:https://www.apachefriends.org/download.html

[[email protected] ~]# ll
1   total 781780
-rw-r--r--  1 root root  6760286 Dec 11  2017 Lepus数据库企业监控系统3.7版本官方下载.zip
-rw-r--r--  1 root root 139708140 Dec 11  2017 xampp-linux-x64-5.6.32-0-installer.run

准备好相关软件

1.1:2:官方提供的集成环境脚本安装

[[email protected] ~]# chmod +x  ./xampp-linux-x64-5.6.32-0-installer.run
[[email protected] ~]# ll xampp-linux-x64-5.6.32-0-installer.run 
-rwxr-xr-x 1 root root 139708140 Dec 11  2017 xampp-linux-x64-5.6.32-0-installer.run
[[email protected] ~]# ./xampp-linux-x64-5.6.32-0-installer.run

分享图片

1.2:安装python模块

https://github.com/farcepest/MysqLdb1/archive/master.zip 下载地址
1.2.1:安装依赖包

[[email protected] ~]# yum install gcc gcc-c++ python-devel -y-y

安装依赖包

1.2.2:安装python-MysqL模块
注:此模块也可以在后面配置监控MysqL时安装

[[email protected] ~]# unzip MysqLdb1-master.zip
[[email protected] ~]# cd MysqLdb1-master
[[email protected] MysqLdb1-master]# which MysqL_config
/usr/local/MysqL/bin/MysqL_config
[[email protected] MysqLdb1-master]# vim site.cfg
[options]
# The path to MysqL_config.
# Only use this if MysqL_config is not on your PATH,or you have some weird
# setup that requires it.
MysqL_config = /usr/local/MysqL/bin/MysqL_config
修改配置同上
[[email protected] MysqLdb1-master]# python setup.py build
Traceback (most recent call last):
  File "setup.py",line 7,in <module>
    import setuptools
ImportError: No module named setuptools

分享图片

1.2.3:安装过程报错解决方
http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
下载setuptols安装

[[email protected] ~]# tar zxf setuptools-0.6c11.tar.gz
[[email protected] ~]# cd setuptools-0.6c11
[[email protected] setuptools-0.6c11]# python setup.py install

分享图片


继续安装即可

@H_403_78@


分享图片

1.3:安装天兔监控软件

1.3.1:创建数据库并授权用户

MysqL> create database lepus default character set utf8;
Query OK,1 row affected (0.06 sec)

MysqL> grant all privileges on lepus.* to [email protected]"192.168.22.%" identified by ‘123456‘;
Query OK,0 rows affected,1 warning (0.09 sec)

MysqL> flush privileges;
Query OK,0 rows affected (0.09 sec)

1.3.2:初始化数据库

[[email protected] ~]# unzip Lepus数据库企业监控系统3.7版本官方下载.zip
[[email protected] sql]# MysqL -uroot -p  lepus < ./lepus_table.sql
Enter password: 
[[email protected] sql]# MysqL -uroot -p  lepus < ./lepus_data.sql 
Enter password:

分享图片


数据库说明:http://www.dbarun.com/docs/lepus/appendix/database/

1.3.3:安装Lepus软件

[[email protected] lepus_v3.7]# cd python/
[[email protected] python]# python test_driver_MysqL.py
libMysqLclient.so.20: cannot open shared object file: No such file or directory
[[email protected] python]# find / -name "libMysqLclient.so.20"
/usr/local/MysqL-5.7.17-linux-glibc2.5-x86_64/lib/libMysqLclient.so.20
[[email protected] python]# ln -s /usr/local/MysqL/lib/libMysqLclient.so.20 /usr/lib64/

分享图片

测试连接

[[email protected] python]# python test_driver_MysqL.py
MysqL python drivier is ok!

安装Lepus

[[email protected] ~]# cd lepus_v3.7/
[[email protected] lepus_v3.7]# cd python/
[[email protected] python]# chmod +x install.sh
[[email protected] python]# ./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.

1.3.4:修改配置文件

[[email protected] python]# cd /usr/local/lepus/
[[email protected] python]# vim etc/config.ini
###监控机MysqL数据库连接地址###
[monitor_server]
host="192.168.22.171"
port=3306
user="lepus"
passwd="123456"
dbname="lepus"

分享图片


启动服务

[[email protected] lepus]# lepus start
nohup: appending output to `nohup.out‘
lepus server start success!

1.4:安装WEB管理端

1.4.1:拷贝PHP程序文件

[[email protected] lepus_v3.7]# cp -ra PHP/* /opt/lampp/htdocs/
cp: overwrite `/opt/lampp/htdocs/index.PHP‘? y
[[email protected] lepus_v3.7]# cd /opt/lampp/htdocs/
[[email protected] htdocs]# ll
total 72
drwxr-xr-x 15 root   root    4096 Feb  9  2015 application
-rw-r--r--  1 root   root  3607 Feb 27  2017 applications.html
-rw-r--r--  1 root   root     177 Feb 27  2017 bitnami.css
drwxr-xr-x 20 root   root    4096 Dec  8 08:07 dashboard
-rw-r--r--  1 root   root   30894 May 11  2007 favicon.ico
drwxr-xr-x  2 root   root    4096 Dec  8 08:07 img
-rw-r--r--  1 root   root    6605 Feb  9  2015 index.PHP
-rw-r--r--  1 root   root    2547 Feb  9  2015 license.txt
drwxr-xr-x  8 root   root    4096 Feb  9  2015 system
drwxr-xr-x  2 daemon daemon  4096 Dec  8 08:07 webalizer

分享图片

1.4.2:配置数据库连接配置文件

[[email protected] htdocs]# vim application/config/database.PHP
$active_group = ‘default‘;
$active_record = TRUE;
$db[‘default‘][‘hostname‘] = ‘192.168.22.171‘;
$db[‘default‘][‘port‘]     = ‘3306‘;
$db[‘default‘][‘username‘] = ‘lepus‘;
$db[‘default‘][‘password‘] = ‘123456‘;
$db[‘default‘][‘database‘] = ‘lepus‘;
$db[‘default‘][‘dbdriver‘] = ‘MysqL‘;

分享图片

1.4.3:登陆WEB管理后台

分享图片

Admin/Lepusadmin 登录后进行修改

猜你在找的Oracle相关文章