使用系统版本
CentOS 7.6 3.10.0-957.el7.x86_64 GNU/Linux
使用软件版本说明
mariadb-5.5.60-1.el7_5.x86_64php-5.4.16-46.el7.x86_64httpd-2.4.6-89.el7.centos.x86_64
lepus版本
Lepus数据库企业监控系统3.7版本官方下载
一、lepus服务部署
01.安装服务
[root@lepus ~]# yum install httpd php php-mysql mariadb-server mysql-devel python-devel python-pip -y
02.创库授权
[root@lepus ~]# systemctl start mariadb[root@lepus ~]# mysql -uroot -pMariaDB [(none)]> create database lepus default character set utf8;Query OK, 1 row affected (0.00 sec)MariaDB [(none)]> grant all on lepus.* to lepus@localhost identified by '123456';Query OK, 0 rows affected (0.00 sec)
03.下载lepus包解压
[root@lepus ~]# wget /soft/download/17 -O lepus.zip[root@lepus ~]# unzip lepus.zip[root@lepus ~]# mv lepus_v3.7/php/* /var/www/html/[root@lepus ~]# chown apache:apache /var/www/html/ -R
04.修改数据库配置文件
[root@lepus ~]# vim /var/www/html/application/config/database.php51 $db['default']['hostname'] = '127.0.0.1';52 $db['default']['port']= '3306';53 $db['default']['username'] = 'lepus';54 $db['default']['password'] = '123456';
05.安装Pythom基础模块
[root@lepus ~]# pip install mysql MySQL-python
06.导入初始数据
[root@lepus ~]# mysql -ulepus -p123456 lepus < lepus_v3.7/sql/lepus_table.sql[root@lepus ~]# mysql -ulepus -p123456 lepus < lepus_v3.7/sql/lepus_data.sql
07.安装采集器
[root@lepus ~]# sh /lepus/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.
08.配置监控机连接数据库
[root@lepus /usr/local/lepus/lepus_v3.7/python/etc]# vim config.ini ###监控机MySQL数据库连接地址###[monitor_server]host="127.0.0.1"port=3306user="lepus"passwd="123456"dbname="lepus"
09.启动相关服务
[root@lepus ~]# systemctl restart httpd[root@lepus ~]# systemctl enable httpd mariadb.service
10.启动lepus服务
[root@lepus ~]# lepus startnohup: appending output to ‘nohup.out’lepus server start success!
二、被监控端操作
01.被监控主机数据库授权
MariaDB [(none)]> grant all on *.* to root@'172.16.1.151' identified by '123456';
三、lepus服务web端添加监控主机
默认登录帐号:admin
默认登录密码:lepusadmin
更新监控主机需要等待,可以将lepus重启
如果觉得《Lepus(天兔)数据库监控系统部署》对你有帮助,请点赞、收藏,并留下你的观点哦!