当前位置:网站首页>PMM(Percona Monitoring and Management )安装记录
PMM(Percona Monitoring and Management )安装记录
2022-07-26 09:23:00 【为天空着色】
安装环境:centos7.2
- 安装docker:
yum install docker -y启动docker
service docker start - 获取PMM服务器镜像:
docker pull percona/pmm-server:latest
- 创建PMM容器
docker create \ -v /opt/prometheus/data \ -v /opt/consul-data \ -v /var/lib/mysql \ -v /var/lib/grafana \ --name pmm-data \ percona/pmm-server:latest /bin/true
- 创建和运行PMM Server Container
docker run -d\ -p 80:80 \ --volumes-from pmm-data\ --name pmm-server\ --restart always\ percona/pmm-server:latest80:80对应端口,可根据需求改(如8089:80)
查看docker运行状态:
docker ps
PMM服务端安装成功
pmm-client安装
制作yum源
rpm -ivh https://www.percona.com/redir/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm如果路径找不到,在官网找到正确的地址在安装:https://www.percona.com/redir/downloads/percona-release/redhat/
安装pmm-client
yum install pmm-client安装percona工具percona-toolkit
yum install percona-toolkit(vpn下安装比较快)
客户端连接pmm server
pmm-admin config --server 192.168.135.140
增加pmm-client监控账号
GRANT ALL PRIVILEGES ON *.* TO 'pmm'@'%' IDENTIFIED BY '1qazXSW2-!'; flush privileges;增加pmm客户端监控mysql到pmm服务器
pmm-admin add mysql --user pmm --password 1qazXSW2-! --host 192.168.135.140 --port 3306
查看PMM客户端添加的所有监控服务
pmm-admin list
pmm-client安装完成
在浏览器输入ip查看mysql监控状态:http://192.168.135.140/

docker常用命令:
# systemctl start docker // 启动docker
# systemctl stop docker // 关闭docker
# docker restart xxx // 重启一个容器
# docker stop xxx // 停止一个容器
# docker rm xxx // 删除一个容器
# docker rm -f xxx // 强制删除一个容器
# docker log xxx // 查看容器日志
# docker ps -a // 查看容器信息
# docker search xxx // 查看 hub上的 xxxx 镜像
# docker pull xxx // 下载包
边栏推荐
猜你喜欢

【线上死锁分析】由index_merge引发的死锁事件

Cat installation and use

Innovus is stuck, prompting x error:

小程序纪录

Windows通过命令备份数据库到本地

Basic use of ArcGIS 4

NTT(快速数论变换)多项式求逆 一千五百字解析

2022 mobile crane driver test question simulation test question bank simulation test platform operation

Server memory failure prediction can actually do this!

Mysql事务
随机推荐
[MySQL] detailed explanation of redo log, undo log and binlog (4)
Li Mu D2L (IV) -- softmax regression
设置视图动态图片
arc-gis基础操作3
Canal 的学习笔记
VectorTileLayer更换style
What is asynchronous operation
Error: Cannot find module ‘umi‘ 问题处理
Pat grade a a1013 battle over cities
Processing of inconsistent week values obtained by PHP and MySQL
When you click input, the border is not displayed!
“could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32” 问题处理
异常处理机制二
Li Mu D2L (VI) -- model selection
"Could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32"
LeetCode三数之和问题
Announcement | FISCO bcos v3.0-rc4 is released, and the new Max version can support massive transactions on the chain
Windows backs up the database locally by command
TableviewCell高度自适应
el-table实现增加/删除行,某参数跟着变