尝试运行一下状态收集脚本
[root@mysql-server scripts]# /var/lib/zabbix/percona/scripts/get_mysql_stats_wrapper.sh gg
/var/lib/zabbix/percona/scripts/get_mysql_stats_wrapper.sh: line 35: /usr/bin/php: No such file or directory
ERROR: run the command manually to investigate the problem: /usr/bin/php -q /var/lib/zabbix/percona/scripts/ss_get_mysql_stats.php --host localhost --items gg
[root@mysql-server scripts]#
这里提示我们系统里没有安装 php ,我们给它装上,同时我们也装上 php-mysql ,它提供了php 连接 mysql 需要的DBI
[root@mysql-server scripts]# yum install php php-mysql
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirrors.pubyun.com
* extras: mirrors.yun-idc.com
* updates: mirrors.pubyun.com
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.3.3-46.el6_6 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-46.el6_6 for package: php-5.3.3-46.el6_6.x86_64
--> Processing Dependency: php-cli(x86-64) = 5.3.3-46.el6_6 for package: php-5.3.3-46.el6_6.x86_64
---> Package php-mysql.x86_64 0:5.3.3-46.el6_6 will be installed
--> Processing Dependency: php-pdo(x86-64) for package: php-mysql-5.3.3-46.el6_6.x86_64
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: php-mysql-5.3.3-46.el6_6.x86_64
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: php-mysql-5.3.3-46.el6_6.x86_64
--> Running transaction check
---> Package Percona-Server-shared-51.x86_64 0:5.1.73-rel14.12.624.rhel6 will be installed
---> Package php-cli.x86_64 0:5.3.3-46.el6_6 will be installed
---> Package php-common.x86_64 0:5.3.3-46.el6_6 will be installed
---> Package php-pdo.x86_64 0:5.3.3-46.el6_6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
========================================================================================================================
Package Arch Version Repository Size
========================================================================================================================
Installing:
php x86_64 5.3.3-46.el6_6 updates 1.1 M
php-mysql x86_64 5.3.3-46.el6_6 updates 86 k
Installing for dependencies:
Percona-Server-shared-51 x86_64 5.1.73-rel14.12.624.rhel6 percona-release-x86_64 2.1 M
php-cli x86_64 5.3.3-46.el6_6 updates 2.2 M
php-common x86_64 5.3.3-46.el6_6 updates 529 k
php-pdo x86_64 5.3.3-46.el6_6 updates 79 k
Transaction Summary
========================================================================================================================
Install 6 Package(s)
Total download size: 6.1 M
Installed size: 19 M
Is this ok [y/N]: y
Downloading Packages:
...
...
Installed:
php.x86_64 0:5.3.3-46.el6_6 php-mysql.x86_64 0:5.3.3-46.el6_6
Dependency Installed:
Percona-Server-shared-51.x86_64 0:5.1.73-rel14.12.624.rhel6 php-cli.x86_64 0:5.3.3-46.el6_6
php-common.x86_64 0:5.3.3-46.el6_6 php-pdo.x86_64 0:5.3.3-46.el6_6
Complete!
[root@mysql-server scripts]#
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。