​CentOS7下Zabbix5.0+PostgreSQL12+TimescaleDB部署实践

本文详细介绍了如何在CentOS7系统中部署Zabbix5.0监控系统,结合PostgreSQL12数据库和TimescaleDB插件进行实践操作。内容涵盖Zabbix Server的安装、PostgreSQL12的配置、TimescaleDB的安装与降级处理、数据库的创建与脚本导入、远程连接与认证配置,以及Zabbix Agent的安装和验证数据采集。文章最后提到,虽然部署过程复杂,但性能提升效果尚待后续测试验证。
摘要由CSDN通过智能技术生成

一、Zabbix Server 安装

 

1、YUM源配置及基础环境准备

curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo 
sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo 

常用软件安装

yum install -y lrzsz bash-completion vim wget net-tools ncdu iftop

关闭SELINUX

setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config

2、zabbix源配置并安装Zabbix Server

rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm

sed -i "s#http://repo.zabbix.com#https://mirrors.aliyun.com/zabbix#g"  /etc/yum.repos.d/zabbix.repo
yum clean all
yum install zabbix-server-pgsql zabbix-agent

3、安装zabbix web

yum install centos-release-scl
sed -i "s/enabled=0/enabled=1/g" /etc/yum.repos.d/zabbix.repo
yum install zabbix-web-pgsql-scl zabbix-nginx-conf-scl

 4、安装数据库PostgreSQL12

wget https://mirrors.aliyun.com/postgresql/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
rpm -ivh pgdg-redhat-repo-latest.noarch.rpm 
sed -i "s#https://download.postgresql.org/pub/#https://mirrors.aliyun.com/postgresql/#g" /etc/yum.repos.d/pgdg-redhat-all.repo
yum install -y postgresql12-server

 PostgreSQL数据库初始化

/usr/pgsql-12/bin/postgresql-12-setup initdb 
systemctl enable --now postgresql-12 
systemctl 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

嗨,您好

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值