初始化 Mysql 数据库 # mysql -u root -p # mysql> CREATE DATABASE zabbix CHARACTER SET UTF8; # mysql> GRANT ALL PRIVILEGES on zabbix.* to ‘zabbix‘@‘localhost‘ IDENTIFIED BY ‘SECRET_PASSWORD‘; # mysql> FLUSH PRIVILEGES; # mysql> quit 导入zabbix的数据结构 # mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.2.9/create/schema.sql # mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.2.9/create/images.sql # mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.2.9/create/data.sql
修改zabbix配置文件,使其能访问数据库 # vi /etc/zabbix/zabbix_server.conf DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=zabbix
重启zabbix service zabbix-server start 网站配置文件默认路径: /usr/share/zabbix