天兔
更多介绍参考官网:http://www.lepus.cc/
参考官方文档,以 Xampp 集成安装相关软件。
Xampp下载地址:https://www.apachefriends.org/download.html
下载安装 Xampp (Apache 2.4.33, MariaDB 10.1.32, PHP 5.6.36 , Perl v5.16.3)
# cd /opt/
# wget https://www.apachefriends.org/xampp-files/5.6.36/xampp-linux-x64-5.6.36-0-installer.run
# chmod +x xampp-linux-x64-1.8.2-5-installer.run
# ./xampp-linux-x64-1.8.2-5-installer.run
相关服务启动命令参考:
./xampp --help
MariaDB 配置:
# 如:启用 mysql,以空密码登录
# cd /opt/lampp/
# vim etc/my.cnf #更改端口,server_id
# ./xampp startmysql
# mysql -P3366 -uroot --socket=/opt/lampp/var/mysql/mysql.sock
mysql>
select user,host from mysql.user;
drop user ''@'localhost';
drop user 'root'@'::1';
drop user 'root'@'127.0.0.1';
update mysql.user set password = password('mysql') where user = 'root';
create user 'root'@'%' identified by 'mysql';
grant all privileges on *.* to 'root'@'%' with grant option;
flush privileges;
Apache & PHP 配置:
# 更改 http 端口(# vim /opt/lampp/etc/httpd.conf)
Listen 8000
#改为服务器IP
ServerName 10.10.10.8
<Directory />
allowoverride none
require all granted #denied修改为granted
</Directory>
Include etc/extra/httpd-vhosts.conf #去掉注释
# 注释掉下面一行(# vim /opt/lampp/etc/extra/httpd-xampp.conf )
# Require local
# 说明:默认WEB代码上传目录:/opt/lampp/htdocs/
# 配置虚拟目录 (vim /opt/lampp/etc/extra/httpd-vhosts.conf )
<virtualHost *:8000>
ServerAdmin lepus.kk.com
DocumentRoot "/opt/lampp/htdocs"
ServerName lepus.kk.com
ServerAlias lepus.kk.com
AddDefaultCharset UTF-8
ERRORLog "logs/demo.lepus.cc-error_log"
CustomLog "logs/demo.lepus.cc-access_log" common
</VirtualHost>
#如:添加文件info.php
# vim /opt/lampp/htdocs/info.php
<?php
phpinfo();
?>
#浏览器输入网址,此时可打开《PHP Version 5.6.36》
http://10.10.10.8:8000/info.php
安装相关 Python 包 (略):
MySQLdb, pymssql,cx_oracle ,Pymongo ,redis-py 常用的python数据库驱动
配置 snmp:
# yum -y install net-snmp*
# vim /etc/snmp/snmpd.conf
#41行 default 改为监控服务器IP
com2sec notConfigUser 10.10.10.8 public
#62行 systemview 改为 all,所有snmp访问权限
access notConfigGroup "" any noauth exact all none none
#85行注释去掉
view all included .1 80
# 更改日志级别
# vim /etc/init.d/snmpd
#OPTIONS="-LS0-6d -Lf /dev/null -p /var/run/snmpd.pid"
OPTIONS="-LS 4 d -p /var/run/snmpd.pid -a"
# 启动 snmpd 服务
/etc/init.d/snmpd start
安装配置 lepus :
# 下载 Lepus 解压更名为 lepus, 路径如下:
# cd /opt/lepus
# mysql 中创建数据库及用户
create database lepus default character set utf8;
grant select,insert,update,delete,create on lepus.* to 'lepus_user'@'127.0.0.1' identified by 'lepus_pwd';
flush privileges;
# 导入表结构和数据
# mysql -P3366 -uroot -p --socket=/opt/lampp/var/mysql/mysql.sock lepus < /opt/lepus/sql/lepus_table.sql
# mysql -P3366 -uroot -p --socket=/opt/lampp/var/mysql/mysql.sock lepus < /opt/lepus/sql/lepus_data.sql
# 安装Lpeus程序
# cd /opt/lepus/python
# chmod +x install.sh
# ./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.
# 修改配置文件
# vim /usr/local/lepus/etc/config.ini
[monitor_server]
host="127.0.0.1"
port=3366
user="lepus_user"
passwd="lepus_pwd"
dbname="lepus"
# 编辑 check_os.sh 添加
# vim /usr/local/lepus/check_os.sh
if [ -z $mem_shared ]; then
mem_shared=0
fi
# 启动lepus采集进程
# /usr/local/lepus/lepus start
# 因为没有添加主机,所以查看日志会看到如下提示,属于正常提示。可以在部署完Lepus WEB控制台后再进行启动
# tail -f logs/lepus.log
2018-06-14 21:32:23 [INFO] check mysql controller finished.
2018-06-14 21:32:41 [INFO] alarm controller started.
2018-06-14 21:32:42 [INFO] alarm controller finished.
mysql execute: not all arguments converted during string formatting
mysql execute: not all arguments converted during string formatting
2018-06-14 21:33:24 [INFO] check mysql controller started.
2018-06-14 21:33:24 [WARNING] check mysql: not found any servers
2018-06-14 21:33:24 [INFO] check mysql controller finished.
vers
2018-06-14 21:33:24 [INFO] check mysql controller finished.
2018-06-14 21:33:52 [INFO] alarm controller started.
te: not all arguments converted during string formatting
####################################################
# 默认的站点目录:/opt/lampp/htdocs/
# 复制PHP文件夹里的文件到Apache对应的网站虚拟目录
# cp -rf /opt/lepus/php/* /opt/lampp/htdocs/
# 打开 database.php文件,修改PHP连接监控服务器的数据库信息
# vim /opt/lampp/htdocs/APPlication/config/database.php
$db['default']['hostname'] = '127.0.0.1';
$db['default']['port'] = '3366';
$db['default']['username'] = 'lepus_user';
$db['default']['password'] = 'lepus_pwd';
$db['default']['database'] = 'lepus';
$db['default']['dbdriver'] = 'mysql';
#浏览器访问,默认管理员账号密码:admin/Lepusadmin
http://10.10.10.8:8000
# 最后记得启动lepus采集进程
/usr/local/lepus/lepus start
相关阅读
因为以前一直都是用的mysql的数据库,所以当新工作中用到Oracle数据库的时候,一时还有点不习惯,特别是一直连接的远
mysql 自关联表,以下为向下递归以及向上递归样例。 1 递归查询前期准备,如果你的表已经存在,可忽略此步。 建表 CREATE TABLE `wq_a
A5创业网(公众号:iadmin5)12月2日报道,近日万豪国际集团披露了一起涉及其喜达屋子公司数据库的黑客攻击事件,称该事件可能影响了5亿名
Sybase PowerDesigner - 一个高端数据建模工具。你可以下载一个45天试用版。ERWin - 一个高端数据建模工具。可下载试用版。
1. 中国比特币遭遇休克式监管 倒闭潮将至没有监管机构的沟通,没有看到红头文件下发,银行的一个业务员通知销户,银行充值渠道停止,这就