percona-toolkit-3.0.13-1.el7.x86_64 安装完成,pt: 未找到命令

来源:7-5 【实战】安装percona工具集

smniuhe

2019-07-15

这都显示安装成功了,为何pt命令还是找不到?难道是需要配置环境变量?
我看了下 /etc/bin 下有相关pt的文件,是不是环境变量需要配置啥的

[root@iZuf6iq8e7ya9v3ix71k0pZ tools]# rpm -ivh percona-toolkit-3.0.13-1.el7.x86_64.rpm
警告:percona-toolkit-3.0.13-1.el7.x86_64.rpm: 头V4 RSA/SHA256 Signature, 密钥 ID 8507efa5: NOKEY
准备中...                          ################################# [100%]
	软件包 percona-toolkit-3.0.13-1.el7.x86_64 已经安装
[root@iZuf6iq8e7ya9v3ix71k0pZ tools]# pt
-bash: pt: 未找到命令
-rwxr-xr-x 1 root root      41748 1月   9 2019 pt-align
-rwxr-xr-x 1 root root     270649 1月   9 2019 pt-archiver
-rwxr-xr-x 1 root root       3891 11月  6 2016 ptaskset
-rwxr-xr-x 1 root root     170784 1月   9 2019 pt-config-diff
-rwxr-xr-x 1 root root     167980 1月   9 2019 pt-deadlock-logger
-rwxr-xr-x 1 root root     166328 1月   9 2019 pt-diskstats
-rwxr-xr-x 1 root root     171101 1月   9 2019 pt-duplicate-key-checker
-rwxr-xr-x 1 root root      50158 1月   9 2019 pt-fifo-split
-rwxr-xr-x 1 root root     151811 1月   9 2019 pt-find
-rwxr-xr-x 1 root root      67305 1月   9 2019 pt-fingerprint
-rwxr-xr-x 1 root root     134957 1月   9 2019 pt-fk-error-logger
-rwxr-xr-x 1 root root     223461 1月   9 2019 pt-heartbeat
-rwxr-xr-x 1 root root     228215 1月   9 2019 pt-index-usage
-rwxr-xr-x 1 root root      32406 1月   9 2019 pt-ioprofile
-rwxr-xr-x 1 root root     256066 1月   9 2019 pt-kill
-rwxr-xr-x 1 root root      21914 1月   9 2019 pt-mext
-rwxr-xr-x 1 root root    6691168 1月   9 2019 pt-mongodb-query-digest
-rwxr-xr-x 1 root root    7168736 1月   9 2019 pt-mongodb-summary
-rwxr-xr-x 1 root root     108133 1月   9 2019 pt-mysql-summary
-rwxr-xr-x 1 root root     423780 1月   9 2019 pt-online-schema-change
-rwxr-xr-x 1 root root      24655 1月   9 2019 pt-pmp
-rwxr-xr-x 1 root root     527581 1月   9 2019 pt-query-digest
-rwxr-xr-x 1 root root    4373536 1月   9 2019 pt-secure-collect
-rwxr-xr-x 1 root root      78243 1月   9 2019 pt-show-grants
-rwxr-xr-x 1 root root      37785 1月   9 2019 pt-sift
-rwxr-xr-x 1 root root     146954 1月   9 2019 pt-slave-delay
-rwxr-xr-x 1 root root     131377 1月   9 2019 pt-slave-find
-rwxr-xr-x 1 root root     184918 1月   9 2019 pt-slave-restart
-rwxr-xr-x 1 root root      74759 1月   9 2019 pt-stalk
-rwxr-xr-x 1 root root      90817 1月   9 2019 pt-summary
-rwxr-xr-x 1 root root     459156 1月   9 2019 pt-table-checksum
-rwxr-xr-x 1 root root     405093 1月   9 2019 pt-table-sync
-rwxr-xr-x 1 root root     247744 1月   9 2019 pt-table-usage
-rwxr-xr-x 1 root root     332909 1月   9 2019 pt-upgrade
-rwxr-xr-x 1 root root     178417 1月   9 2019 pt-variable-advisor
写回答

2回答

sqlercn

2019-07-15

默认情况下pt 应该是安装在/usr/bin目录下的,并不用设置环境变量。不知道是不是你系统的原因安装在了/etc/bin/下。如何没有安装在标准目录下则需要手动设置一下export PATH=/etc/bin:$PATH这样就可以了。

0
1
smniuhe
谢谢解答,明白了,可能是以前一些配置的问题
2019-07-16
共1条回复

smniuhe

提问者

2019-07-15

pt-* 相关命令是可以使用的,pt 可能是 alias

0
0

零基础入门 详解企业主流数据库MySQL8.0

掌握SQL优化与慢查询优化,具备独当一面的能力

1641 学习 · 485 问题

查看课程