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

zabbix安装

时间:2017-07-27 22:30:43      阅读:198      评论:0      收藏:0      [点我收藏+]

标签:监控

安装zabbix:

server、web端

MySQL数据库


rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

yum -y install mysql-community-server

systemctl start mysqld

systemctl enable mysqld

mysql_secure_installation


rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm

yum install zabbix-server-mysql zabbix-web-mysql


mysql -uroot -p

    create database zabbix character set utf8 collate utf8_bin;

    grant all privileges on zabbix.* to zabbix@localhost identified by ‘<password>‘;

    quit;


cd /usr/share/doc/zabbix-server-mysql-3.*

zcat create.sql.gz | mysql -uroot -p zabbix


vi /etc/zabbix/zabbix_server.conf

    DBHost=localhost

    DBName=zabbix

    DBUser=zabbix

    DBPassword=zabbix


vi /etc/httpd/conf.d/zabbix.conf

    max_execution_time 300

    memory_limit 128M

    post_max_size 16M

    php_value upload_max_filesize 2M

    max_input_time 300

    always_populate_raw_post_data -1

    date.timezone Asia/Shanghai


systemctl start zabbix-server

systemctl enable zabbix-server

systemctl start httpd

systemctl enable httpd


遇到问题:

    web GUi zabbix server is not running.

    log:    5108:20170626:124234.107 [Z3001] connection to database ‘zabbix‘ failed: [1130] Host ‘local‘ is not allowed to connect to this MySQL server

 15108:20170626:124234.109 Cannot connect to the database. Exiting...


数据库没有授权。解决方法:grant all privileges on zabbix.* to zabbix@‘%‘ identified by ‘<password>‘;


zabbix安装

标签:监控

原文地址:http://lishenggui.blog.51cto.com/12857150/1951510

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