Press "Enter" to skip to content

Lepus服务端安装

官方文档地址:http://www.dbarun.com/docs/lepus/guide/
相关软件下载:
https://sourceforge.net/projects/xampp/files/XAMPP%20Linux/1.8.2/xampp-linux-x64-1.8.2-5-installer.run/download
http://cdn.lepus.cc/cdncache/software/MySQLdb-python.zip
http://cdn.lepus.cc/cdncache/software/redis-py-2.10.3.tar.gz
https://pypi.python.org/packages/82/26/f45f95841de5164c48e2e03aff7f0702e22cef2336238d212d8f93e91ea8/pymongo-3.4.0.tar.gz
http://www.lepus.cc/soft/17
安装所需环境xampp
cd /root
#加权限
chmod +x xampp-linux-x64-1.8.2-5-installer.run
#安装
./xampp-linux-x64-1.8.2-5-installer.run
#启动
/opt/lampp/lampp start
追加环境变量
echo "export PATH=$PATH:/opt/lampp/bin/" >>/etc/profile
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/lampp/lib" >>/etc/profile
source /etc/profile
2、安装MySQLdb-python(监控MySQL必须安装)
unzip MySQLdb-python.zip
cd MySQLdb1-master/
#查看mysql_config命令所在
which mysql_config
/opt/lampp/bin/mysql_config
#配置site.cfg
vi site.cfg
mysql_config= /opt/lampp/bin/mysql_config
#安装依赖包
yum -y install gcc libffi-devel python-devel openssl-devel
yum -y install urpmi xterm
ln -s /usr/lib64/libssl.so.1.0.1e /usr/lib64/libssl.so.1.0.0
ln -s /usr/lib64/libcrypto.so.1.0.1e /usr/lib64/libcrypto.so.1.0.0
python setup.py build
python setup.py install
3、安装Redis 驱动 (监控Redis则必须安装)
tar -xvf redis-py-2.10.3.tar.gz
cd redis-2.10.3/
python setup.py install
#下面执行check_redis.py的时候会报错,修改如下:
sed -n '38s/charset/encoding/gp' /usr/local/lepus/check_redis.py
4、安装Pymongo(监控Mongodb则必须安装)
tar -xvf pymongo-3.4.0.tar
cd pymongo-3.4.0
python setup.py instal
三.数据库配置
#创建监控库lepus
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;
#导入库表结构
mysql -uroot -p lepus < /root/lepus/sql/lepus_table.sql
mysql -uroot -p lepus < /root/lepus_v3.7/sql/lepus_data.sql
#修改字段数据类型
mysql>use lepus
mysql>alter table mysql_status modify column max_connect_errors bigint(18);
mysql>alter table mysql_status_history modify column max_connect_errors bigint(18);
四.lepus配置
1、安装
unzip Lepus数据库企业监控系统3.7版本官方下载.zip
cd lepus_v3.7/python/
chmod +x install.sh
./install.sh
2、更改配置文件
vim /usr/local/lepus/etc/config.ini
###监控机MySQL数据库连接地址###
[monitor_server]
host="192.168.0.172"
port=3306
user="lepus_user"
passwd="MANAGER"
dbname="lepus"
cp -r php/* /opt/lampp/htdocs/
vim /opt/lampp/htdocs/application/config/database.php
51 $db['default']['hostname'] = '192.168.0.172';
52 $db['default']['port'] = '3306';
53 $db['default']['username'] = 'lepus_user';
54 $db['default']['password'] = 'MANAGER';
55 $db['default']['database'] = 'lepus';
56 $db['default']['dbdriver'] = 'mysql';
cd /usr/local/lepus/
lepus start

Be First to Comment

发表评论

电子邮件地址不会被公开。 必填项已用*标注