1、下载安装包
wget -c https://github.com/prometheus/prometheus/releases/download/v2.13.0/prometheus-2.13.0.linux-amd64.tar.gz
%首先先去官网下载对应系统的版本,这里是2.13.0版本
2、安装
[root@test ~]# tar -xf prometheus-2.13.0.linux-amd64.tar.gz -C /usr/local/bin/ %解压到指定目录
[root@test ~]# cd /usr/local/bin
[root@test bin]# ls
prometheus-2.13.0.linux-amd64
[root@test bin]# cd prometheus-2.13.0.linux-amd64/
[root@test prometheus-2.13.0.linux-amd64]# ls
console_libraries LICENSE prometheus promtool
consoles NOTICE prometheus.yml tsdb
[root@test prometheus-2.13.0.linux-amd64]# ln -sv /usr/local/bin/prometheus-2.13.0.linux-amd64/ /usr/local/Prometheus %制作软连接
‘/usr/local/Prometheus’ -> ‘/usr/local/bin/prometheus-2.13.0.linux-amd64/’
[root@test prometheus-2.13.0.linux-amd64]# vim prometheus.yml %修改配置文件
static_configs:
- targets: ['172.25.77.10:9090'] %访问ip和端口
[root@test prometheus-2.13.0.linux-amd64]# ./prometheus & %打入后台运行
3、网页查看
访问172.25.77.10:9090
,可以看到成功进入普罗米修斯