首页 > 代码库 > zabbix安装
zabbix安装
安装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安装