9:登录数据库,创建zabbix数库存 create database zabbix character set utf8 collate utf8_bin;
然后在做一个授权 grant all privileges on zabbix.* to zabbix@localhost identified by ''; 这里""我忘记改了, 暂且就用这个吧,后面登入web再去改。(授权账号为zabbix@localhost 可以用 password 登录数据库
这一步骤,你装的数据库不同,方法不同,可以参考官方文档:https://www.zabbix.com/documentation/3.4/manual/appendix/install/db_scripts
用命令 show databases; 可以查看到我们上面创建的zabbix这个库
10: 然后导入初始架构(Schema)和数据。
cd /usr/share/doc/zabbix-server-mysql-3.4.10/
ls 可以查看一下有那些文件
zcat create.sql.gz | mysql -uroot zabbix -p
可以登录到数据库里查看我们导入了那些数据架构和数据表
mysql -uroot -p
show database;
use zabbix
show tables;
需要重启Apache Web服务器。
systemctl start httpd
systemctl status httpd (查看Web 服务运行状态)
如果有提示这条: Jun 17 03:48:01 localhost.localdomain httpd[4162]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message 解决方法:用vi打开 Apache配置文件位于 /etc/httpd/conf.d/zabbix.conf 加一条: ServerName domain_name:80
或者本地主机 ServerName localhost:80
如下图: