执行
yum install zabbix-server-MySQL zabbix-web-mysql初始化数据库
shell> mysql -uroot -p123456mysql> create database zabbix character set utf8 collate utf8_bin;mysql> grant all PRivileges on zabbix.* to zabbix@localhost identified by 'zabbix';mysql> quit;Bye导入初始化表结构和数据
zcat /usr/share/doc/zabbix-server-mysql-3.2.*/create.sql.gz | mysql -uzabbix -p zabbix备注:执行时会要求输入密码,密码即为创建zabbix用户时设置的密码,我这边儿设置的密码为zabbix
查看执行情况
[root@localhost /]# mysql -u zabbix -pEnter passWord: mysql> use zabbixReading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -ADatabase changedmysql> show tables;可以看到在zabbix数据库下新建了很多张表
查看mysql版本
rpm -q zabbix-server-mysql修改zabbix配置文件
# vi /etc/zabbix/zabbix_server.confDBHost=localhostDBName=zabbixDBUser=zabbixDBPassword=<password>此处password即为上边儿创建用户初始化数据库时设置的密码,我这边为zabbix
修改时区 时区配置文件在/etc/httpd/conf.d/zabbix.conf这个文件中,将date.timezone这行注释去掉并修改为Asia/Shanghai
新闻热点
疑难解答