Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Centos7 install lepus

2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

1. Install 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

two。 Install the python module

Yum install MySQL-python.x86_64-y

3. Install lepus

Yum install git-y

Cd / usr/local

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

Cd lepus

Chmod upright 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. Create a monitoring database in the monitoring machine

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; / / pilot table structure

Source lepus_data.sql; / / redirect data

5. Modify the configuration file

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

[monitor_server]

Host= "127.0.0.1"

Port=3306

User= "admin"

Passwd= "123456"

Dbname= "lepus"

6. Start Lepus

Lepus start

7. Install the web management background

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. Restart httpd

Systemctl restart httpd

9. Visit lepus

Http://192.168.10.1

Admin/Lepusadmin

10. Add mysql monitoring instance on lepus

First of all, it needs to be authorized on the monitored side.

Grant select,process,super on. To 'testusre'@'192.168.10.1' identified by' Redhat.123'

Flush privileges

Then add it on the web management page-"configuration Center"-MySQL

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report