Zabbix5.0部署

Zabbix简介

1、是开源的、跨平台的监控服务

2、支持多种获取数据的方式

a)SNMP协议:适用于监控网络设备

b) zabbix-agent:适用于主机/服务器

c) IPMI协议 :适用于获取硬件的物理信息、CPU的温度

d)JMX协议 :适用于java应用

3、多种报警方式

4、自动发现、自动注册功能

5、提供API接口

Zabbix5.0版本安装

1、关闭selinux、firewalld重启主机

    1  vim /etc/selinux/config

    2  setenforce 0

    3  getenforce

    4  systemctl stop firewalld.service

    5  systemctl enable firewalld.service

    6  systemctl disenable firewalld.service

    7  systemctl disable firewalld.service

2、安装相关服务

# 安装zabbix 5.0 yum源 

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

# 清理yum缓存

yum clean all

#安装数据库

yum install mariadb-server.x86_64

systemctl start mariadb.service

systemctl enable mariadb.service

systemctl status mariadb.service

#在数据库中创建zabbix库,再创建一个存放zabbix初始数据

mysql -uroot

mysql> create database zabbix character set utf8 collate utf8_bin;

mysql> grant all privileges on zabbix.* to 'zabbix'@'localhost' identified by 'redhat';

mysql> flush privileges;

mysql> exit;

#导入初始架构和数据

cd /usr/share/doc/zabbix-server-mysql-5.0.21/

zcat create.sql.gz | mysql -uroot zabbix

#安装httpd服务

yum install httpd-manual.noarch

systemctl start httpd

systemctl enable httpd

systemctl status httpd

# 安装zabbix server 和 agent

yum install zabbix-server-mysql zabbix-agent

# 安装红包软件集合包

yum install centos-release-scl

# 编辑配置文件

cd /etc/yum.repos.d/zabbix.repo

[zabbix-frontend]

name=Zabbix Official Repository frontend - $basearch

baseurl=http://repo.zabbix.com/zabbix/5.0/rhel/7/$basearch/frontend

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591

# 安装zabbix前端软件包

yum install zabbix-web-mysql-scl zabbix-apache-conf-scl

# 修改 zabbix_server.conf 配置文件

vim /etc/zabbix/zabbix_server.conf

DBHost=localhost

DBName=zabbix

DBUser=zabbixuser

DBPassword=redhat

DBSocket=/var/lib/mysql/mysql.sock(套接字文件路径)

# 修改时区

vim /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf

php_value[date.timezone] = Asia/Shanghai

#把zabbix-server加入开机启动项,重启rh-php72-php-fpm并加入开机启动项

systemctl start httpd

systemctl enable httpd

systemctl enable rh-php72-php-fpm.service

#查看zabbix服务信息

netstat -antp | grep zabbix

# 去浏览器登录zabbix-agent

# 初始用户密码

Admin

zabbix

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值