软件包放置仅需在server1节点执行。
1 2 3 4 5 6 7 | mkdir -p /opt/prometheus cd /opt/prometheus wget --no-check-certificate https://go.dev/dl/go1.22.2.linux-arm64.tar.gz wget --no-check-certificate https://cdn.npmmirror.com/binaries/node/v19.9.0/node-v19.9.0-linux-arm64.tar.xz wget --no-check-certificate https://github.com/prometheus/prometheus/releases/download/v2.45.4/prometheus-2.45.4.linux-arm64.tar.gz wget --no-check-certificate https://github.com/prometheus/node_exporter/releases/download/v1.7.0/node_exporter-1.7.0.linux-arm64.tar.gz wget --no-check-certificate https://dl.grafana.com/enterprise/release/grafana-enterprise-10.4.2.linux-arm64.tar.gz |
go1.22.2.linux-arm64.tar.gz grafana-enterprise-10.4.2.linux-arm64.tar.gz node_exporter-1.7.0.linux-arm64.tar.gz node-v19.9.0-linux-arm64.tar.xz prometheus-2.45.4.linux-arm64.tar.gz
tar -zxvf go1.22.2.linux-arm64.tar.gz tar -zxvf grafana-enterprise-10.4.2.linux-arm64.tar.gz tar -zxvf node_exporter-1.7.0.linux-arm64.tar.gz tar -xvf node-v19.9.0-linux-arm64.tar.xz tar -zxvf prometheus-2.45.4.linux-arm64.tar.gz
解压后包含如下目录。
1 2 3 4 5 | go grafana-v10.4.2 node_exporter-1.7.0.linux-arm64 node-v19.9.0-linux-arm64 prometheus-2.45.4.linux-arm64 |
#目录列表 node_exporter-1.7.0.linux-arm64 node-v19.9.0-linux-arm64 go #复制到其他节点 scp -r node_exporter-1.7.0.linux-arm64 node-v19.9.0-linux-arm64 go agent1:/opt/prometheus/ scp -r node_exporter-1.7.0.linux-arm64 node-v19.9.0-linux-arm64 go agent2:/opt/prometheus/ scp -r node_exporter-1.7.0.linux-arm64 node-v19.9.0-linux-arm64 go agent3:/opt/prometheus/