centos7安装lepus

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添加


网站题目:centos7安装lepus
标题来源:http://scyanting.com/article/jseesi.html