强大的开源企业级数据监控利器Lepus安装与配置管理
开篇介绍官方网站:http://www.lepus.cc 简单介绍: 1.1:安装所需的LAMP环境1.1.1:下载软件: [[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 下载地址 [[email?protected] ~]# yum install gcc gcc-c++ python-devel -y-y 安装依赖包 1.2.2:安装python-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:安装过程报错解决方案 [[email?protected] ~]# tar zxf setuptools-0.6c11.tar.gz [[email?protected] ~]# cd setuptools-0.6c11 [[email?protected] setuptools-0.6c11]# python setup.py install 继续安装即可 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管理后台 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |