In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
CentOS build lepus3.8 monitor MySQL
LNMP Environment
yum -y install gcc libffi-devel python-devel openssl-devel mysql-devel zlib-devel
Monitor installation database connection Python driver package
1). Install MySQLdb for python (must be installed if you need to monitor MySQL)
MySQLdb is a class library for Python to connect to and manipulate MySQL. If you are going to use lepus system to monitor MySQL database, this module must be installed.
Web disk download address: pan.baidu.com/s/1bpnVrOF
[root@jk ~]# wget http://cdn.lepus.cc/cdncache/software/MySQLdb-python.zip
[root@jk ~]# unzip MySQLdb-python.zip
[root@jk ~]# cd MySQLdb1-master/
[root@jk ~]# which mysql_config
/usr/local/mysql/bin/mysql_config
[root@jk ~]# vim site.cfg modified as follows:
mysql_config = /usr/local/mysql/bin/mysql_config
[root@jk ~]# cd MySQLdb1-master/
[root@jk ~]# python setup.py build
[root@jk ~]# python setup.py install
Download lepus3.8 official address
http://www.lepus.cc/soft/18
[root@jk ~]# unzip lepus3.8.zip
[root@jk ~]# cd Lepus_v3.8_beta
Create a monitoring database in the monitor and authorize it.
monitoring library
[root@jk ~]# mysql -uroot -p"ZyKJ@TeST233"
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;
[root@HE3Lepus_v3.8_beta]# mysql -uroot -p lepus
< sql/lepus_table.sql [root@HE3Lepus_v3.8_beta]# mysql -uroot -p lepus < sql/lepus_data.sql ##### set names utf8; ###### mysql>use lepusmysql> 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 library
mysql> grant select,super,process,reload,show databases,replication client on *.* to'lepus_monitor'@'localhost' identified by 'MANAGER';mysql> flush privileges;
Install the Lpeus program
Go to the python folder of the Lepus package
# cd python/
Grant install.sh executable permissions
# chmod +x install.sh
perform the installation
# ./ install.sh
modify the configuration file
Go to the installation directory, default to/usr/local/lepus
[root@HE3~]# vi /usr/local/lepus/etc/config.ini
###Monitor MySQL Database Connection Address ###
[monitor_server]host="192.168.1.250"port=4008user="lepus_user"passwd="MANAGER"dbname="lepus"
Restart the lepus process
ln -s /usr/local/lepus/lepus /etc/init.d/
service lepus stop
service lepus start
[root@HE3lepus]# tail -f logs/lepus.log
Installation of the WEB Management Panel
Go to your lepus software directory
[root@HE3 ~]# cd Lepus_v3.8_beta/
[root@HE3Lepus_v3.8_beta]# cp -r php /home/www
[root@HE3 ~]# 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 hosts and monitoring
Open the monitoring interface through the browser and log in to the system. Default Administrator Account Password admin/Lepusadmin After logging in, please modify the administrator password and add an ordinary account.
-----
After all services are deployed, the page access is abnormal, reporting 404, or permissions, etc., because Nginx support rewrite is required.
server { listen 12889; server_name 211.144.95.44;#rewrite rule if (!- e $request_filename) { rewrite ^(.*)$ /index.php? s=$1 last; break; } index index.html index.htm index.php; root /data/www/Dianrui_Lepus; location ~ .*\. (php|php5)?$ { #fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; } location ~ .*\. (gif|jpg|jpeg|png|bmp|swf)$ { expires 30d; } location ~ .*\. (js|css)?$ { expires 1h; } access_log /dev/null; error_log /data/wwwlogs/lepus_web_error.log; }
Change your lepus login username and password
mysql> use lepusmysql> update admin_user set password=md5("ZykJ@testAdmin") where user_id=1;mysql> update admin_user set username='zykj_admin' where user_id=1;
This is the login mysql modify lepus login account and password
zykj_admin ZykJ@testAdmin
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.