centos7安装lepus

发布时间:2020-08-06 08:44:09 作者:lovek8s
来源:网络 阅读:223

1.安装lamp

wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm

yum localinstall mysql80-community-release-el7-3.noarch.rpm

yum install mysql-server

systemctl start mysqld

systemctl enable mysqld

grep password /var/log/mysqld.log

mysql_secure_installation

yum install php php-mysql

systemctl start httpd

systemctl enabled httpd

2.安装python模块

yum install MySQL-python.x86_64 -y

3.安装lepus

yum install git -y

cd /usr/local

git clone https://github.com/ruzuojun/lepus.git

cd lepus
chmod u+x lepus*

ln -s /usr/local/lepus/lepus /usr/local/sbin/lepus
ln -s /usr/local/lepus/lepus_monitor /usr/local/sbin/lepus_monitor

4.在监控机创建监控数据库

cd /usr/local/lepus/sql/

mysql -u root -p

create database lepus default character set utf8;
grant select,insert,update,delete,create on lepus.* to ‘admin’@’localhost’ identified by ‘123456’;
flush privileges;

use lepus;
source lepus_table.sql; // 先导表结构
source lepus_data.sql; // 再导数据

5.修改配置文件

vim /usr/local/lepus/etc/config.ini

[monitor_server]

host=”127.0.0.1″
port=3306
user=”admin”
passwd=”123456″
dbname=”lepus”

6.启动Lepus
lepus start

7.安装web管理后台

cp -rf /usr/local/lepus/web/* /var/www/html/

vim /var/www/html/application/config/database.php

$db[‘default’][‘hostname’] = ‘localhost’;
$db[‘default’][‘port’] = ‘3306’;
$db[‘default’][‘username’] = ‘admin’;
$db[‘default’][‘password’] = ‘123456’;
$db[‘default’][‘database’] = ‘lepus’;

8.重启httpd

systemctl restart httpd

9.访问lepus

http://192.168.10.1

admin/Lepusadmin

10.在lepus上添加mysql监控实例

首先需要在被监控端授权

grant select,process,super on . to ‘testusre’@’192.168.10.1’ identified by ‘Redhat.123’;

flush privileges;

然后在web管理页面—“配置中心”—MySQL添加

推荐阅读:
  1. CentOS7 Go安装
  2. centos7安装jenkins

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

linux centos lepus

上一篇:zabbix server is not running:t

下一篇:Linux流派及发行版概览

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》