In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Environment:
192.168.1.128 mini2
All required software packages:
Https://pan.baidu.com/s/1uAZqYnST0VwoCLL3Ir3FCg
Lamp environment is required for Lepus installation
Install LAMP:
Close selinux
[root@mini2 ~] # vim / etc/selinux/config
SELINUX=disabled
[root@mini2 ~] # setenforce 0
[root@mini2 ~] # yum install-y httpd php mariadb mariadb-server php-mysql
[root@mini2 ~] # yum-y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl curl-devel
Start the service
[root@mini2 ~] # systemctl start httpd
[root@mini2 ~] # systemctl start mariadb.service
[root@mini2 ~] # systemctl enable mariadb.service
[root@mini2 ~] # systemctl enable httpd
There is no password after mariadb installation. You need to set the password.
[root@mini2] # mysqladmin-uroot-p password '123'
Enter password:
Test whether php can connect to the database
[root@mini2 ~] # vim / var/www/html/index.php
[root@mini2] # firewall-cmd-- permanent-- add-port=80/tcp
Success
[root@mini2] # firewall-cmd-- reload
Success
Install MySQLdb for python (must be installed if you need to monitor MySQL)
Install the MySQLdb for python dependency package
[root@mini2 ~] # yum-y install gcc libffi-devel python-devel openssl-devel mysql-devel zlib-devel
[root@mini2 src] # ls
Distribute-0.6.28.tar.gz Lepus.zip MySQLdb-python.zip.zip
[root@mini2 src] # unzip MySQLdb-python.zip.zip
[root@mini2 src] # which mysql_config
/ usr/bin/mysql_config
[root@mini2 src] # cd MySQLdb1-master/
[root@mini2 MySQLdb1-master] # vim site.cfg
Mysql_config = / usr/bin/mysql_config # after modification
[root@mini2 MySQLdb1-master] # python setup.py build
Wrong message urllib2.HTTP error 403: SSL required
Solution:
[root@mini2 MySQLdb1-master] # cd..
[root@mini2 src] # tar zxf distribute-0.6.28.tar.gz
[root@mini2 src] # cd distribute-0.6.28/
[root@mini2 distribute-0.6.28] # python setup.py build
[root@mini2 distribute-0.6.28] # python setup.py install
[root@mini2 distribute-0.6.28] # cd.. / MySQLdb1-master/
[root@mini2 MySQLdb1-master] # python setup.py build
[root@mini2 MySQLdb1-master] # python setup.py install # installed successfully
Install lepus
[root@mini2 MySQLdb1-master] # cd..
[root@mini2 src] # unzip Lepus.zip
[root@mini2 src] # cd Lepus_v3.8_beta/
Create a monitoring database on the monitoring machine and authorize it.
[root@mini2 Lepus_v3.8_beta] # mysql-uroot-p123
MariaDB [(none)] > create database lepus default character set utf8
MariaDB [(none)] > grant select,insert,update,delete,create on lepus.* to 'lepus_user'@'%' identified by' 123'
Import tables and data
[root@mini2 Lepus_v3.8_beta] # mysql-uroot-p123 lepus
< sql/lepus_table.sql [root@mini2 Lepus_v3.8_beta]# mysql -uroot -p123 lepus < sql/lepus_data.sql 登录数据库更改表的信息 MariaDB [(none)]>Use lepus
MariaDB [lepus] > alter table mysql_status modify column max_connect_errors bigint (18)
MariaDB [lepus] > alter table mysql_status_history modify column max_connect_errors bigint (18)
The database is monitored, and this time it is the local machine that is monitored.
MariaDB [lepus] > grant select,super,process,reload,show databases,replication client on *. * to 'lepus_monitor'@'%' identified by' 123'
Go to the python folder of the Lepus package
[root@mini2 Lepus_v3.8_beta] # cd python/
Grant install.sh executable permission
[root@mini2 python] # chmod + x install.sh
Perform installation
[root@mini2 python] #. / install.sh
Modify the configuration file
[root@mini2 python] # vim / usr/local/lepus/etc/config.ini
# MySQL database connection address of monitor computer #
[monitor_server]
Host= "192.168.1.129"
Port=3306
User= "lepus_user"
Passwd= "123"
Dbname= "lepus
[root@mini2 python] # ln-s / usr/local/lepus/lepus / etc/init.d/
[root@mini2 python] # service lepus start
Lepus server start success! # service started successfully
Install the WEB Management desk
[root@mini2 Lepus_v3.8_beta] # cp-rf php/* / var/www/html/
Cp: overwrite'/ var/www/html/index.php'? Y
[root@mini2 Lepus_v3.8_beta] # vim / var/www/html/application/config/database.php
You can log in to the system by opening the monitoring interface through the browser. . Default administrator account password after logging in with admin/Lepusadmin, please change the administrator password and add an ordinary account.
Monitoring succeeded
Monitoring mini1mysql database
[root@mini1] # mysql-uroot-p123456
Mysql > grant select,super,process,reload,show databases,replication client on *. * to 'lepus_monitor'@'%' identified by' 123'
You also need to close selinux.
[root@mini1 ~] # setenforce 0
[root@mini2 Lepus_v3.8_beta] # vim / etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.128 mini1.centos7.com
192.168.1.129 mini2.centos7.com
[root@mini1] # firewall-cmd-- permanent-- add-port=3306/tcp
[root@mini1] # firewall-cmd-- reload
[root@mini2 Lepus_v3.8_beta] # service lepus stop
[root@mini2 Lepus_v3.8_beta] # service lepus start
[root@mini2 Lepus_v3.8_beta] #
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.