CentOS Build lepus3.8 Monitor MySQL

Source: Internet
Author: User
Tags administrator password

CentOS Build lepus3.8 Monitor MySQL


Yum-y install gcc libffi-devel python-devel openssl-devel mysql-devel zlib-devel


Monitor side install database connect Python driver package

1). Install MySQLdb for Python (must be installed if you need to monitor MySQL)

MySQLdb connects and operates the MySQL class library for Python, which must be installed if you are ready to use the Lepus system to monitor the MySQL database.

[Email protected] ~]# wget http://cdn.lepus.cc/cdncache/software/MySQLdb-python.zip

[Email protected] ~]# Unzip Mysqldb-python.zip

[Email protected] ~]# CD mysqldb1-master/

[email protected] ~]# which mysql_config

/usr/local/mysql/bin/mysql_config

[[email protected] ~]# vim Site.cfg modified as follows:

Mysql_config =/usr/local/mysql/bin/mysql_config

[[email protected] ~]# python setup.py build

[[email protected] ~]# python setup.py install



Download lepus3.8 official Address

Http://www.lepus.cc/soft/18


[Email protected] ~]# Unzip Lepus3.8.zip

[Email protected] ~]# CD Lepus_v3.8_beta


Create a monitoring database and authorize it on the monitor machine.

Monitoring Library

[Email protected] ~]# mysql-uroot-p "[Email protected]"

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;

[Email protected]_v3.8_beta]# mysql-uroot-p Lepus < Sql/lepus_table.sql

[Email protected]_v3.8_beta]# mysql-uroot-p Lepus < Sql/lepus_data.sql

##### set names UTF8; ######

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);

Monitored libraries

Mysql> Grant Select,super,process,reload,show databases,replication Client on * * to ' lepus_monitor ' @ ' localhost ' Identified by ' MANAGER ';

mysql> flush Privileges;

Installing the Lpeus Program

Go to the Python folder of the Lepus software package

# CD python/

Grant install.sh executable permissions

# chmod +x install.sh

Performing the installation

#./install.sh

Modifying a configuration file

Go to the installation directory, default to/usr/local/lepus

[[Email protected]~]# Vi/usr/local/lepus/etc/config.ini

# # #监控机MySQL数据库连接地址 # #

[Monitor_server]

Host= "192.168.1.250"

port=4008

User= "Lepus_user"

Passwd= "MANAGER"

Dbname= "Lepus"

Restarting the Lepus process

Ln-s/usr/local/lepus/lepus/etc/init.d/


Service Lepus stop

Service Lepus start

[Email protected]]# tail-f Logs/lepus.log


Installing the Web Management Console

Go to your Lepus software catalog

[Email protected] ~]# CD lepus_v3.8_beta/

[Email protected]_v3.8_beta]# cp-r php/home/www

[Email protected] ~]# vim/home/www/php/application/config/database.php

$db [' Default '] [' hostname '] = ' 192.168.1.250 ';

$db [' Default '] [' port '] = ' 4008 ';

$db [' Default '] [' username '] = ' lepus_user ';

$db [' Default '] [' password '] = ' MANAGER ';

$db [' Default '] [' database '] = ' Lepus ';

$db [' Default '] [' dbdriver '] = ' mysql ';

Login to add host and monitor

You can log in to the system by opening the monitoring interface via the browser: Default Administrator account password admin/lepusadmin after login, please modify the administrator password to increase the normal account.



-----

2017/04/24 16:50:32 [ERROR] 17648#0: *100 open ()

"/var/www/html/index.php/login" failed (20:not a directory),

client:124.207.48.234, server:221.195.1.233, request: "GET

/index.php/login?return_url=http://221.195.1.233:8080/index.php

http/1.1 ", Host:" 221.195.1.233:8080 "

-----error message



Modify Lepus login user name and password

Mysql> Use Lepus


mysql> Update Admin_user set PASSWORD=MD5 ("[email protected]") where user_id=1;


mysql> Update admin_user set username= ' Zykj_admin ' where user_id=1;



This is login MySQL to modify Lepus login account and password


zykj_admin [email protected]


CentOS Build lepus3.8 Monitor MySQL

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.