centos7中安装zabbix
Posted fenghumen
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos7中安装zabbix相关的知识,希望对你有一定的参考价值。
centos7中安装zabbix
1、关闭防火墙
# systemctl stop firewalld
# setenforce 0
同步时间
# ntpdate pool.ntp.org
2、安装Apache、php、mariadb
# yum -y install httpd mariadb mariadb-server php php-mysql php-gd
3、启动mariadb
# systemctl start mariadb.service
4、登录mysql(新装的没有密码。直接登录)
# mysql
创建zabbix数据库,并授权:
MariaDB [(none)]>create database zabbix charset utf8;
MariaDB [(none)]> grant all on zabbix.* to zabbix@’localhost’ identified by ‘zabbix‘;
MariaDB [(none)]> flush privileges;
5、启动Apache
# systemctl start httpd
6、安装zabbix
# rpm -ivh zabbix-release-3.4-2.el7.noarch.rpm
# yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent
7、导入数据库
# cd /usr/share/doc/zabbix-server-mysql-3.4.9/
# zcat create.sql.gz | mysql -uzabbix -pzabbix zabbix
9、vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
10、启动zabbix
# systemctl start zabbix-server
11、编辑php.ini 配置文件,修改时区
# vim /etc/php.ini
date.timezone = Asia/Shanghai
12、重启apache
# systemctl restart httpd
13、网页登录
以上是关于centos7中安装zabbix的主要内容,如果未能解决你的问题,请参考以下文章