Zabbix3.4-部署安装

Posted tcheng

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Zabbix3.4-部署安装相关的知识,希望对你有一定的参考价值。

Zabbix部署安装:

系统环境:CentOS 7

Zabbix版本:Zabbix 3.4

 

 

  1. 关闭防火墙和SELINUX

systemctl stop firewalld && setenforce 0

  1. 安装zabbix相关软件包

rpm -ivh https://mirrors.aliyun.com/zabbix/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm &&\

yum install zabbix-server zabbix-web zabbix-server-mysql zabbix-web-mysql mariadb-server mariadb zabbix-agent -y

  1. 修改php时区配置

sed -i ‘[email protected]# php_value date.timezone Europe/[email protected]_value date.timezone Asia/[email protected]‘ /etc/httpd/conf.d/zabbix.conf

  1. 启动数据库

systemctl start mariadb

  1. 创建zabbix所用的数据库及用户

mysql

create database zabbix character set utf8 collate utf8_bin;

grant all on zabbix.* to [email protected]‘localhost‘ identified by ‘123456‘;

exit

cd /usr/share/doc/zabbix-server-mysql-3.4.7/ &&\

zcat create.sql.gz|mysql -uzabbix -p123456 zabbix

  1. 修改zabbix配置文件

vim /etc/zabbix/zabbix_server.conf

DBHost=localhost

DBName=zabbix

DBUser=zabbix

DBPassword=123456

或者使用以下命令替换:

sed -i ‘[email protected]# [email protected][email protected]‘ /etc/zabbix/zabbix_server.conf &&\

sed -i ‘[email protected]# [email protected][email protected]‘ /etc/zabbix/zabbix_server.conf

  1. 启动zabbix

systemctl start zabbix-server &&\

systemctl start httpd

 

 

 

 

 

部署安装脚本:

systemctl stop firewalld && setenforce 0 &&\

rpm -ivh https://mirrors.aliyun.com/zabbix/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm &&\

yum install zabbix-server zabbix-web zabbix-server-mysql zabbix-web-mysql mariadb-server mariadb zabbix-agent -y &&\

sed -i ‘[email protected]# php_value date.timezone Europe/[email protected]_value date.timezone Asia/[email protected]‘ /etc/httpd/conf.d/zabbix.conf &&\

systemctl start mariadb &&\

mysql

create database zabbix character set utf8 collate utf8_bin;

grant all on zabbix.* to [email protected]‘localhost‘ identified by ‘123456‘;

exit

cd /usr/share/doc/zabbix-server-mysql-3.4.7/ &&\

zcat create.sql.gz|mysql -uzabbix -p123456 zabbix &&\

sed -i ‘[email protected]# [email protected][email protected]‘ /etc/zabbix/zabbix_server.conf &&\

sed -i ‘[email protected]# [email protected][email protected]‘ /etc/zabbix/zabbix_server.conf &&\

systemctl start zabbix-server &&\

systemctl start httpd

 

以上是关于Zabbix3.4-部署安装的主要内容,如果未能解决你的问题,请参考以下文章

CentOS6.8源码安装部署Zabbix3.4.5

Zabbix3.4.5部署安装

CentOS 7下安装部署Zabbix3.4

zabbix3.4服务端安装

Centos7下安装部署Zabbix3.4

Zabbix3.4安装部署 操作过程手册