【发布时间】:2016-01-28 01:57:57
【问题描述】:
我有 3 个使用 OS Centos7 的 EC2 实例。 我已在其中一个实例 (server1) 上并行安装。
可以访问所以没有 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)。
现在我编写了一个名为 test 的简短 bash 脚本:
#!/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(仅在我的 server1 上)。
谁能解释我做错了什么。
编辑: 没有文件也试过了:
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
【问题讨论】:
-
这些实例上似乎没有安装 perl。
标签: bash perl ssh parallel-processing centos7