创建zabbix数据库
mysql –uroot -p
create database zabbix character set utf8; (创建数据库和类型)
insert into mysql.user(Host,User,Password)values('localhost','zabbix',password('zabbix')); (创建数据库用户密码)
grant 权限1,权限2,…权限n on [url=]数据库[/url]名称.表名称 to 用户名@用户地址 identified by ‘连接口令’;
grant all on zabbix.* to 'zabbix'@'127.0.0.1' identified by 'zabbix' with grant option; (授权所有表)
grant all on zabbix.* to 'zabbix'@'localhost' identified by 'zabbix' with grant option; (授权所有表)
flush privileges; (更新数据)
邮件报警
安装mailx
配置Zabbix服务端外部邮箱
vi /etc/mail.rc #编辑,添加以下信息
set from=xxx@163.com smtp=smtp.163.com
set smtp-auth-user= xxx@163.com smtp-auth-password=密码
set smtp-auth=login