Centos7系统安装Zabbix4.4步骤详解

Centos7系统安装Zabbix4.4步骤详解

1. 虚拟机中安装Centos7系统

本次实验使用最小系统安装,安装完后可以先进行内核软件更新(yum -y update)时间比较久,快速配置可以忽略此步骤。

2.关闭Centos7的SELinux和防火墙配置

关闭SELinux

>[root@localhost ~]# setenforce 0
>[root@localhost ~]# vi /etc/selinux/config

在这里插入图片描述
关闭防火墙配置

>[root@localhost ~]# systemctl stop firewalld.service
>[root@localhost ~]# systemctl disable firewalld.service

3.部署zabbix4.4服务器、zabbix4.4官网教程链接

1.安装 数据库

>[root@localhost ~]# rpm -Uvh https://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpm
>[root@localhost ~]# yum clean all 
>[root@localhost ~]# yum makecache

2.安装Zabbix服务器,前端,代理(如果没有安装成功,需多次执行下载才能完全安装)

>[root@localhost ~] yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent

把三个服务全部安装完成
在这里插入图片描述
3. 安装mariadb数据库(设置开机启动)

>[root@localhost ~]# yum install -y mariadb-server    //更新MARIABD数据库
>[root@localhost ~]# systemctl start mariadb.service  //启动防火墙
>[root@localhost ~]# systemctl enable mariadb.service  //设置开机启动

4.导入Zabbix数据到Mysql数据库

[root@localhost ~]#  mysql -uroot -p
Enter password:        //空密码直接按回车键

MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'password';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> quit;
Bye

5.导入初始架构和数据,系统将提示您输入新创建的密码。

[root@localhost ~]# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
Enter password:          //password

6.为Zabbix server配置数据库

[root@localhost ~]# vi /etc/zabbix/zabbix_server.conf
DBPassword=password    //在文本中添加

7.修改时区

[root@localhost ~]# vi /etc/httpd/conf.d/zabbix.conf
 php_value date.timezone Asia/Shanghai

8.启动Zabbix server和agent进程

[root@localhost ~]#  systemctl restart zabbix-server zabbix-agent httpd
[root@localhost ~]#  systemctl enable zabbix-server zabbix-agent httpd 

9.为Centos7配置IP地址。
centos7配置IP地址

10.配置Zabbix前端

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

在这里插入图片描述
在这里插入图片描述
11.设置成中文页面
设置成中文

  • 3
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值