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、网页登录

http://ip/zabbix/

posted @ 2020-06-18 23:51  风虎门  阅读(214)  评论(0)    收藏  举报