gnu-parallel: exec: perl: 未找到
gnu-parallel: exec: perl: not found
我有 3 个 EC2 实例 OS Centos7。
我在其中一个实例 (server1) 上安装了 parallel。
可以访问,所以没有 SSH 问题
ssh root@ip-10-0-xx-xx.xx-xx-1.compute.internal date
给了我日期。
ssh $SERVER echo works
works
我在这里创建了一个 ALL_SERVERS 文件,其中包含我的服务器的主机名 (root@ip-10-0-xx-xx.xx-xx-1.compute.internal) .
现在我写了一个简短的 bash-脚本,名称为 test:
#!/bin/bash
echo 'hello'
我想要 运行 这个脚本(在 server1 上启动)。同时在 server2 和 server3 上。
parallel ./test.sh --sshloginfile ALL_SERVERS
但它只是显示 Academic tradition requires you to cite works you base your article on....
在输入几次后,它显示了 hello(仅在我的服务器 1 上)。
谁能解释一下我做错了什么。
编辑:
也试过没有文件:
parallel --sshlogin root@ip-10-0-xx-xx.xx-xx-1.compute.internal echo hello
output: bash: line 0: exec: perl: not found
我也试过这个:
parallel --tag --nonall --slf ALL_SERVERS
现在我得到:
root@ip-10-0-0-xx.xx-xx-1.compute.internal bash: line 0: exec: perl: not found
root@ip-10-0-0-xx.xx-xx-1.compute.internal bash: line 0: exec: perl: not found
这个:
parallel ./test.sh --sshloginfile ALL_SERVERS
不等于:
parallel --sshloginfile ALL_SERVERS ./test.sh
你想要最后一个。
perl
必须安装在worker上。
ssh remote perl -e \''print "OK\n"'\'
必须 return 可以。
我有 3 个 EC2 实例 OS Centos7。 我在其中一个实例 (server1) 上安装了 parallel。
可以访问,所以没有 SSH 问题
ssh root@ip-10-0-xx-xx.xx-xx-1.compute.internal date
给了我日期。
ssh $SERVER echo works
works
我在这里创建了一个 ALL_SERVERS 文件,其中包含我的服务器的主机名 (root@ip-10-0-xx-xx.xx-xx-1.compute.internal) .
现在我写了一个简短的 bash-脚本,名称为 test:
#!/bin/bash
echo 'hello'
我想要 运行 这个脚本(在 server1 上启动)。同时在 server2 和 server3 上。
parallel ./test.sh --sshloginfile ALL_SERVERS
但它只是显示 Academic tradition requires you to cite works you base your article on....
在输入几次后,它显示了 hello(仅在我的服务器 1 上)。
谁能解释一下我做错了什么。
编辑: 也试过没有文件:
parallel --sshlogin root@ip-10-0-xx-xx.xx-xx-1.compute.internal echo hello
output: bash: line 0: exec: perl: not found
我也试过这个:
parallel --tag --nonall --slf ALL_SERVERS
现在我得到:
root@ip-10-0-0-xx.xx-xx-1.compute.internal bash: line 0: exec: perl: not found
root@ip-10-0-0-xx.xx-xx-1.compute.internal bash: line 0: exec: perl: not found
这个:
parallel ./test.sh --sshloginfile ALL_SERVERS
不等于:
parallel --sshloginfile ALL_SERVERS ./test.sh
你想要最后一个。
perl
必须安装在worker上。
ssh remote perl -e \''print "OK\n"'\'
必须 return 可以。