我该如何安装postgresql 9.3的pgbench?
我已经在CentOS 64位上基本设置好了我的postgresql 9.3,并且它运行正常,没有任何问题。
然后我在我的CentOS机器上安装了postgresql93-contrib。但是我似乎没有pgbench?我得到了“command not found”(命令未找到)的错误提示?
我在bash下执行以下命令:
pgbench -i -U test test
有什么想法吗?
我该如何安装postgresql 9.3的pgbench?
我已经在CentOS 64位上基本设置好了我的postgresql 9.3,并且它运行正常,没有任何问题。
然后我在我的CentOS机器上安装了postgresql93-contrib。但是我似乎没有pgbench?我得到了“command not found”(命令未找到)的错误提示?
我在bash下执行以下命令:
pgbench -i -U test test
这个功能在contrib库中,具体拼写取决于您使用的repo,类似于postgresql93-contrib
有可能pgbench不在您的默认路径中。那么您可以通过执行以下命令来运行它:/usr/pgsql-10/bin/pgbench --help
yum whatprovides pgbench
会返回postgresql-contrib
。 - juan.facorro在CentOS6中
安装pgbench
yum install postgresql93-contrib
然后pgbench将出现在/usr/pgsql-9.3/bin中
将此路径添加到系统中
vi /etc/profile
将 /usr/pgsql-9.3/bin 添加到 Path 中
source /etc/profile
/usr/pgsql-9.3/bin/pgbench
,你能检查一下这个文件是否存在吗?如果存在的话,只需要更正你的 PATH 即可。 - fvu