1. 系统要求 📋
2. 安装步骤 🛠
方法一:源码编译 🧪
- 下载源码包:
- 解压并进入目录:
tar -xzf prometheus-*.tar.gz cd prometheus-*
- 编译安装:
make sudo make install
方法二:使用包管理器 📦
- Debian/Ubuntu:
sudo apt-get install prometheus
- CentOS/RHEL:
sudo yum install prometheus
- macOS(Homebrew):
brew install prometheus
3. 配置与启动 🚀
- 编辑配置文件:
- 启动服务:
prometheus --config.file=/etc/prometheus/prometheus.yml
4. 验证安装 🧾
- 访问本地监控界面:
- 浏览器打开:
http://localhost:9090
5. 常见问题 🚨
- 权限不足?参考:/zh/troubleshooting
- 配置错误?查看:/zh/config-reference