一,下载离线安装包
wget https://github.com/prometheus/prometheus/releases/download/v3.5.0/prometheus-3.5.0.linux-amd64.tar.gz
二,安装
tar xvfz prometheus-*.tar.gz -C /usr/local
cd /usr/local/prometheus-*
三,修改配置文件指定被监控端
cp prometheus.yml prometheus.yml.bak
cat prometheus.yml

四,后台启动
nohup /usr/local/prometheus-3.5.0.linux-amd64/prometheus>> /usr/local/prometheus-3.5.0.linux-amd64/prometheus.log 2>&1&
五,被监控节点安装node_exporter
wget https://ghfast.top/https://github.com/prometheus/node_exporter/releases/download/v1.9.1/node_exporter-1.9.1.linux-amd64.tar.gz
tar -xf node_exporter-1.9.1.linux-amd64.tar.gz -C /usr/local/
nohup /usr/local/node_exporter-1.9.1.linux-amd64/node_exporter >> /usr/local/node_exporter-1.9.1.linux-amd64/node_exporter.log 2>&1 &
[root@node1 ~]
root 4314 0.3 0.3 1241436 14088 pts/0 Sl 02:04 0:00 /usr/local/node_exporter-1.9.1.linux-amd64/node_exporte
root 4332 0.0 0.0 112808 968 pts/0 S+ 02:04 0:00 grep --color=auto node_exporter
[root@node1 ~]
六,部署Grafana
wget https://dl.grafana.com/oss/release/grafana-12.1.0-1.x86_64.rpm
yum -y install grafana-12.1.0-1.x86_64.rpm
yum list installed|grep grafana
[root@master ~]
[root@master ~]
Created symlink from /etc/systemd/system/multi-user.target.wants/grafana-server.service to /usr/lib/systemd/system/grafana-server.service.
七,访问Grafana
systemctl start grafana-server
systemctl status grafana-server
systemctl stop grafana-server
账号:admin
初始密码:admin