CentOS 7下安装部署Zabbix3.4
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS 7下安装部署Zabbix3.4相关的知识,希望对你有一定的参考价值。
Zabbix安装:环境:
系统环境:CentOS 7
Zabbix版本:Zabbix 3.4
安装步骤:
- 关闭防火墙和SELINUX
systemctl stop firewalld && setenforce 0 - 安装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 - 修改php时区配置
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 - 创建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 - 修改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 - 启动zabbix
systemctl start zabbix-server &&\
systemctl start httpd
安装Zabbix脚本:
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
以上是关于CentOS 7下安装部署Zabbix3.4的主要内容,如果未能解决你的问题,请参考以下文章