码迷,mamicode.com
首页 > 其他好文 > 详细

centos7中安装zabbix

时间:2020-06-19 00:35:29      阅读:86      评论:0      收藏:0      [点我收藏+]

标签:password   rest   iad   strong   charset   vim   bho   database   microsoft   

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/

centos7中安装zabbix

标签:password   rest   iad   strong   charset   vim   bho   database   microsoft   

原文地址:https://www.cnblogs.com/fenghumen/p/13160841.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!