1 搭建docker
centos 下 參考文檔搭建docker https://www.cnblogs.com/brady-wang/p/11543237.html
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 docker run -d \ -p 80:80 \ --volumes-from pmm-data \ --name pmm-server \ --restart always \ percona/pmm-server:1.1.1
如果報錯
docker: Error response from daemon: driver failed programming external connectivity on endpoint pmm-server (0590b182d1390597128b8d44ec7d488ec376e876326208aaad35480eeccadaa2): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 80 -j DNAT --to-destination 172.17.0.2:80 ! -i docker0: iptables: No chain/target/match by that name.
下面鏈接解決
https://blog.csdn.net/qq_37674858/article/details/79761558
安裝客戶端
wget https://www.percona.com/downloads/pmm-client/pmm-client-1.1.1/binary/tarball/pmm-client-1.1.1.tar.gz tar zxf pmm-client-1.1.1.tar.gz cd pmm-client-1.1.1 ./install
以上都是在mac下搭建的,在linux下搭建后,瀏覽器無法訪問,pmm-admin連不上 不知道什么原因
[root@localhost pmm-client-1.1.1]# pmm-admin config --server 127.0.0.1:80
Unable to connect to PMM server by address: 127.0.0.1:80
Get http://127.0.0.1:80: dial tcp 127.0.0.1:80: getsockopt: connection refused
* Check if the configured address is correct.
* If server is running on non-default port, ensure it was specified along with the address.
* If server is enabled for SSL or self-signed SSL, enable the corresponding option.
* You may also check the firewall settings.
參考文檔
https://www.cnblogs.com/yancun8141/articles/10837638.html
https://www.imooc.com/article/26728