/etc/init.d/postfix start
================
过程中出现的问题
================
如果出现管理界面zabbix服务未启动:Zabbix server is not running the information displayed may not be current
Zabbix Server is running的值为NO
注意检查:
1)/etc/hosts文件
#127.0.0.1 localhost.localdomain localhost
42.120.x.x aliyun #localhost注意更改成自己的主机名,这个问题折腾了很久,42.120.x.x是我本机的外网IP
127.0.0.1 internal.yr.com localhost.localdomain localhost 后面邮件告警设置时指定的域名
2)查看日志/tmp/zabbix_server.log分析错误,本地测下mysql权限是否开放
#mysql -h 42.120.x.x -P 3306 -u root -p
#fgrep -A 5 DBconnect /tmp/zabbix_server.log 检查连接信息
调试过程:
mysql>grant all on zabbix.* to 'root'@'42.120.x.x'; #如没有权限则需赋权
mysql>drop user root@'42.120.x.x';
mysql>create user root@'42.120.x.x' identified by '123456';
mysql>show grants for root@42.120.x.x;
mysql>grant all privileges on *.* to root@'42.120.x.x';
mysql>flush privileges;
smysql>show grants for root@localhost;
如果不希望以root帐号来连接,可以创建zabbix帐号来连接zabbix,赋予权限. web管理界面连接时更改为zabbix帐号来连接
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
Query OK, 0 rows affected (0.00 sec)
mysql> show grants for zabbix@localhost;
+---------------------------------------------------------------------------------------------------------------+
| Grants for zabbix@localhost |

+---------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'zabbix'@'localhost' IDENTIFIED BY PASSWORD '*DEEF4D7D88CD046ECA02A80393B7780A63E7E789' |
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/ruanjian/article-27594-3.html
看起来是还可以的说