一、docker安装
参考:http://www.cnblogs.com/liuyongsheng/articles/6595353.html
二、Percona Monitoring and Management (PMM)安装
1、获取镜像
[root@monitor ~]# docker pull percona/pmm-server Using default tag: latest latest: Pulling from percona/pmm-server c60055a51d74: Pull complete 755da0cdb7d2: Pull complete 969d017f67e6: Pull complete 37c9a9113595: Pull complete a3d9f8479786: Pull complete b6ab3b0bfa0d: Pull complete 65ab16956847: Pull complete a1417d0dd36e: Pull complete 97fa057ce7a8: Pull complete a58aa2e3d188: Pull complete a91dfa894b5c: Pull complete c8aaab5d6dd1: Pull complete f2e439363693: Pull complete 19471b0bedf3: Pull complete 836c269361ef: Pull complete 5faa36b0e7e5: Pull complete bdef22c080c7: Pull complete 595467d59d25: Pull complete f636241c708a: Pull complete 61a4967f7976: Pull complete 1acd44e68ea8: Pull complete 25b64909c59a: Pull complete Digest: sha256:a12d17e48ceffce7f92d27f84dc827848626c144117a88ec4bf0d43a39dc6479 Status: Downloaded newer image for percona/pmm-server:latest [root@monitor ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE percona/pmm-server latest 21e0ea6d9e06 4 weeks ago 737 MB hello-world latest 48b5124b2768 2 months ago 1.84 kB
2、Create a PMM Data Container
[root@monitor ~]# docker tag percona/pmm-server percona/pmm-server:1.1.1 [root@monitor ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE percona/pmm-server 1.1.1 21e0ea6d9e06 4 weeks ago 737 MB percona/pmm-server latest 21e0ea6d9e06 4 weeks ago 737 MB hello-world latest 48b5124b2768 2 months ago 1.84 kB [root@monitor ~]# 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.1.1 /bin/true 59dcfd8e715532141bd52df1a12b9c7864600dd3981273693d1c7e0c9060bc08
3、Create and Run the PMM Server Container
[root@monitor ~]# docker run -d \ > -p 8080:80 \ > --volumes-from pmm-data \ > --name pmm-server \ > --restart always \ > percona/pmm-server:1.1.1 136eb3d556d4295bc2b0d5b1e6cceb643c29cab27cb44270d323560ef6c67403 [root@monitor ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 136eb3d556d4 percona/pmm-server:1.1.1 "/opt/entrypoint.sh" 4 seconds ago Up 3 seconds 443/tcp, 0.0.0.0:8080->80/tcp pmm-server [root@monitor ~]# netstat -tlnp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1053/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1974/master tcp6 0 0 :::8080 :::* LISTEN 19226/docker-proxy tcp6 0 0 :::22 :::* LISTEN 1053/sshd tcp6 0 0 ::1:25 :::* LISTEN 1974/master
4、确认安装信息
5、PMM Client安装