进入官网(https://prometheus.io/download/),根据实际情况,选择环境。下载prometheus的安装包
server端
[Unit]
Description=Prometheus
Documentation=https://prometheus.io/
After=network.target
[Service]
Type=simple
ExecStart=/opt/app/prometheus/prometheus --config.file=/opt/app/prometheus/prometheus.yml
Restart=on-failure
[Install]
WantedBy=multi-user.target
systemctl start prometheus
systemctl status prometheus
从官方网站 https://prometheus.io/download/ 下载对应环境的包并解压
wget https://github.com/prometheus/node_exporter/releases/download/v1.3.1/node_exporter-1.3.1.linux-amd64.tar.gz
tar -xzvf node_exporter-1.3.1.linux-amd64.tar.gz
cd node_exporter-1.3.1.linux-amd64
nohup ./node_exporter &