How to Install Prometheus on CentOS?

How to Install Prometheus on CentOS?

Installation steps for Prometheus

Step-1:Add Prometheus Repository

$ sudo vi /etc/yum.repos.d/prometheus-rpm_release.repo

$[prometheus-rpm_release]

name=prometheus-rpm_

release baseurl=https://packagecloud.io/prometheus-rpm/release/el/8/$basearch

repo_gpgcheck=0

gpgcheck=0

nabled=1

gpgkey=https://packagecloud.io/prometheus-rpm/release/gpgkey

sslverify=1

sslcacert=/etc/pki/tls/certs/ca-bundle.crt

metadata_expire=300

[prometheus-rpm_release-source]

name=prometheus-rpm_release-source baseurl=https://packagecloud.io/prometheus-rpm/release/el/8/SRPMS repo_gpgcheck=0

gpgcheck=0

enabled=1

gpgkey=https://packagecloud.io/prometheus-rpm/release/gpgkey

sslverify=1

sslcacert=/etc/pki/tls/certs/ca-bundle.crt

metadata_expire=300

Step-2:Update your system packages.

$ sudo dnf update

Step-3: Then install prometheus by using this command.

$sudo dnf install prometheus

Step-4:we can check prometheus version.

$prometheus --version

Step-4:Adjust the Firewall settings to allow Prometheus service.

$sudo firewall-cmd --add-port=9090/tcp --permanent $sudo firewall-cmd --reload

Step-5:Then start and enable the Prometheus service.

$sudo systemctl enable --now prometheus.service

Step-5:Check the status of the service.

$sudo systemctl status prometheus

Step-5:Now, check the ip address in your browser.

https://localhost:9090

Thanks to our interns who participated in this initiative.


Thank you for reading this article. We are happy to prepare articles as per your request. Please comment on which tool you want installation process. Also please comment in any issues with above installation.

要查看或添加评论,请登录

AIMaster.live的更多文章

社区洞察

其他会员也浏览了