Centos 7 搭建 Zabbix

本文详细介绍了在CentOS 7上如何搭建Zabbix服务器和客户端代理的步骤,包括关闭SELinux、启用MariaDB、数据库配置、服务端安装与验证、客户端代理的安装与配置,以及在Zabbix前端页面添加并监控客户端。
摘要由CSDN通过智能技术生成

背景不多说,直接上干货!

Zabbix-Server端:

关闭SELinux

[root@localhost ~]# setenforce 0        //临时修改,重启失效

修改配置文件:/etc/selinux/config
SELINUX=enforcing   改成  SELINUX= disabled

关闭防火墙
[root@localhost ~]# systemctl stop firewalld            //关闭防火墙
[root@localhost ~]# systemctl disable firewalld          //开机不启动防火墙

删除原来配置的yum源
[root@localhost ~]# rm -rf /etc/yum.repos.d/*         //删除其他yum源

配置阿里云 yum源
[root@localhost ~]# vi /etc/yum.repos.d/zabbix.repo
[os]
name=os
baseurl=https://mirrors.aliyun.com/centos/7/os/x86_64/
gpgcheck=0
enabled=1

[non-supported]
name=non-supported
baseurl=https://mirrors.aliyun.com/zabbix/non-supported/rhel/7/x86_64/
gpgcheck=0
enabled=1

[zabbix]
name=zabbix 3.2
baseurl=https://mirrors.aliyun.com/zabbix/zabbix/3.2/rhel/7/x86_64/
gpgcheck=0
enabled=1


重新缓存yum源

[root@localhost ~]yum clean all
[root@localhost ~]yum repolist

安装zabbix-server
[root@localhost ~]# yum install -y zabbix-server-mysql zabbix-web-mysql

安装数据库
[root@localhost ~]# yum groupinstall -y mariadb mariadb-client


修改/etc/my.cnf
在[mysqld]下添加
character-set-server=utf8    ##设置字符集
innodb_file_per_table=1      ##让innodb每个表文件单独存放


启动mariadb数据库

[root@localhost ~]# systemctl enable mariadb

[root@localhost ~]# systemctl start mariadb


交互式界面初始化数据库

[root@localhost ~]# mysql_secure_installation 


创建zabbix库

                
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值