RHEL84安装ZABBIX5

  • 挂载光盘,配置yum 源
  1. 建目录

#mkdir /mnt/rhel84

  1. 上传光盘镜像

/root/rhel-8.4-x86_64-dvd.iso

  1. 编辑/etc/fstab文件,新增一行

    /root/rhel-8.4-x86_64-dvd.iso /mnt/rhel84 iso9660 loop    0 0

  1. 编辑/etc/yum.repos.d/local.repo

[LocalRepo_BaseOS]

name=LocalRepository_BaseOS

baseurl=file:///mnt/rhel84/BaseOS

enabled=1

gpgcheck=0

[LocalRepo_AppStream]

name=LocalRepository_AppStream

baseurl=file:///mnt/rhel84/AppStream

enabled=1

gpgcheck=0

[root@localhost yum.repos.d]#

  1. 安装zabbix repository

# rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/zabbix-release-5.0-1.el8.noarch.rpm

  1. 执行

yum clean all

yum makecache

  • 安装配置ZABBIX SERVER
  1. 依次执行:

         # yum install zabbix-server-mysql zabbix-agent

# yum install gcc gcc-c++ autoconf automake zlib zlib-devel openssl openssl-devel pcre pcre-devel net-snmp-devel libevent-devel  curl-devel libxml2-devel pcre* -y

# yum install net-snmp net-snmp-utils –y

  1. 安装mariadb

# yum install mariadb mariadb-server

# systemctl start mariadb.service

# systemctl enable mariadb.service

# mysql_secure_installation

  1. 配置mariadb

# mysql -uroot -p

password

mysql> create database zabbix character set utf8 collate utf8_bin;

mysql> create user zabbix@localhost identified by 'password';

mysql> grant all privileges on zabbix.* to zabbix@localhost;

mysql> quit;

# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix

  1. 为Zabbix server配置数据库

编辑配置文件 /etc/zabbix/zabbix_server.conf

DBPassword=password

  1. 为Zabbix前端配置PHP

 /etc/php-fpm.d/zabbix.conf

php_value[date.timezone] = "Asia/Shanghai"

  1. 启动Zabbix server和agent进程

# systemctl restart zabbix-server zabbix-agent httpd php-fpm

# systemctl enable zabbix-server zabbix-agent httpd php-fpm

  • 配置Zabbix前端

连接到新安装的Zabbix前端: http://server_ip_or_name/zabbix

  • 开始使用Zabbix
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值