Percona Monitoring and Management 搭建

1、Docker 安装 CentOS 7 镜像挂在上 yum install docker -y

2、PMM 安装:https://blog.csdn.net/h952520296/article/details/78436031

            https://blog.csdn.net/isoleo/article/details/78213178

https://blog.csdn.net/ashic/article/details/76418844

https://www.cnblogs.com/zengkefu/p/7232938.html

https://www.jianshu.com/p/97233bac2964

https://www.linuxba.com/archives/7915

3、下载https://www.percona.com/software/database-tools/percona-monitoring-and-management  pmm-server-1.10.0.docker

    切换到相应目录,把本地文件导入到本地镜像库:

cd /etc/selinux/

vi configv

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

#    enforcing - SELinux security policy is enforced.

#    permissive - SELinux prints warnings instead of enforcing.

#    disabled - No SELinux policy is loaded.

SELINUX=disabled

# SELINUXTYPE= can take one of three two values:

#    targeted - Targeted processes are protected,

#    minimum - Modification of targeted policy. Only selected processes are protected.

#    mls - Multi Level Security protection.

SELINUXTYPE=targeted

systemctl stop firewalld.service

systemctl disable firewalld.service

监控和被监控机器都要配置。

docker load < pmm-server-1.10.0.docker

docker images

docker create \

  -v /opt/prometheus/data \

  -v /opt/consul-data \

  -v /var/lib/mysql \

  -v /var/lib/grafana \

  --name pmm-data \

  percona/pmm-server:1.10.0 /bin/true

https://www.cnblogs.com/zengkefu/p/7232938.html

https://www.cnblogs.com/xuezhigu/p/8257129.html

http://www.ywnds.com/?p=9713

docker run -d \

  -p 8080:80 \

  --network bridge \

  --volumes-from pmm-data \

  --name pmm-server \

  --restart always \

  percona/pmm-server:1.10.0


  进入容器

  docker ps -a

  docker exec -it f03feacc72be /bin/bash

  docker exec -it pmm-server /bin/bash

docker restart pmm-server

docker stop f03feacc72be

docker start f03feacc72be

docker ps -a

docker rm f03feacc72be

docker exec -it pmm-server /bin/bash

mysql

GRANT ALL PRIVILEGES ON  *.* TO 'pmm'@'192.168.118.%' IDENTIFIED BY 'pmm';

flush privileges;

客户端安装

https://blog.csdn.net/nghuyong/article/details/54025761

http://www.oracle.com/technetwork/cn/articles/vasiliev-django-100817-zhs.html

UPDATE user SET authentication_string = password ('rootroot') WHERE User = 'root' ;

alter  user 'root'@'localhost' identified by 'QA!@wed4';

flush privileges;

grant all privileges on *.* to root@'' identified by 'QA!@wed4';

flush privileges;

mysql

pmm-client

percona-toolkit

客户端连接pmm server

https://blog.csdn.net/ashic/article/details/76418844

https://blog.csdn.net/u011186019/article/details/78605769

https://blog.csdn.net/m0_37083172/article/details/54947922

systemctl stop firewalld.service

systemctl disable firewalld.service

sudo pmm-admin config --server 192.168.118.4:8080

pmm-admin check-network

pmm-admin list

pmm-admin info

pmm-admin restart --all

pmm-admin add mysql --user root --password  'QA!@wed4' --host 127.0.0.1 --port 3306

pmm-admin add mysql --user root --password 'QA!@wed4' --host 192.168.118.3 --port 3306

你可能感兴趣的:(Percona Monitoring and Management 搭建)