cevincheung
V2EX  ›  DevOps

有什么工具可以执行一个命令在所有服务器上都执行的?

  •  
  •   cevincheung · Dec 13, 2014 · 7120 views
    This topic created in 4355 days ago, the information mentioned may be changed or developed.
    比如在服务器A上执行cd /mnt/dir
    别的机器上也会执行 /mnt/dir。咋搞?
    30 replies  •  2016-09-19 19:47:13 +08:00
    Livid
    Livid
    MOD
    PRO
    Dec 13, 2014❤️3
    1
    cd 是为了切换当前工作目录吧,那执行完了之后应该还有其他后续的指令。

    看一下 Ansible Playbook 吧:

    http://docs.ansible.com/playbooks.html
    keniusahdu
    keniusahdu
    Dec 13, 2014❤️2
    3
    xshell 支持当前已连接的服务器同时执行一条命令
    wzxjohn
    wzxjohn
    Dec 13, 2014 via iPhone
    4
    SecureCRT也可以。如果只是单纯的批量执行命令,试试parallels-ssh
    ifishman
    ifishman
    Dec 13, 2014
    5
    dock?
    wanwangkangluo1
    wanwangkangluo1
    Dec 13, 2014
    6
    ansible
    lovdanny
    lovdanny
    Dec 13, 2014
    7
    DSH (dancer's shell)
    haofly
    haofly
    Dec 13, 2014
    8
    XShell
    muzuiget
    muzuiget
    Dec 13, 2014
    9
    ansible
    kofwang
    kofwang
    Dec 13, 2014
    10
    试试saltstack
    twl007
    twl007
    Dec 13, 2014
    11
    Hadoop - -
    phoenixlzx
    phoenixlzx
    Dec 13, 2014
    12
    ansible +1
    codegear
    codegear
    Dec 13, 2014
    13
    puppet?
    libo26
    libo26
    Dec 13, 2014
    14
    服务器数量不多的话xshell就可以
    pythonee
    pythonee
    Dec 13, 2014
    15
    fabric
    ipconfiger
    ipconfiger
    Dec 13, 2014
    16
    fabric + 1
    9hills
    9hills
    Dec 13, 2014 via iPhone
    17
    pssh
    tangzx
    tangzx
    Dec 13, 2014 via iPhone
    18
    Fabric 比 ansible 更适合,ansible 强加了很多自己的意识形态,而且也没有fabric稳定
    bearice
    bearice
    Dec 13, 2014
    19
    polysh 数量少的时候iterm的broadcast功能就行
    zy2013
    zy2013
    Dec 13, 2014
    20
    ansible+1
    laotaitai
    laotaitai
    Dec 13, 2014
    21
    @keniusahdu
    怎么搞? 我看了下, 不知道咋整.
    cevincheung
    cevincheung
    OP
    Dec 14, 2014
    22
    @keniusahdu 谢谢,看到了。

    @laotaitai 查看->撰写栏 然后点击左边的icon选择发送到所有窗口
    iT2afL0rd
    iT2afL0rd
    Dec 14, 2014
    23
    @kofwang salt +1
    well
    well
    Dec 14, 2014
    24
    xshell Menu => View => Compose Bar
    wuwuyun
    wuwuyun
    Dec 14, 2014
    25
    @kofwang salt+2
    laotaitai
    laotaitai
    Dec 15, 2014
    26
    @cevincheung
    哇不错! 谢谢哈
    crazybubble
    crazybubble
    Dec 15, 2014
    27
    chef
    lfzyx
    lfzyx
    Mar 8, 2015
    28
    saltstack +1
    dennyzhang
    dennyzhang
    Sep 13, 2016
    29
    我是把 ansible 包成 Jenkins job


    Parallel Run Commands On Multiple Servers
    http://www.dennyzhang.com/parallel_run_commands/
    helixzz
    helixzz
    Sep 19, 2016
    30
    @keniusahdu 我也是…每次在 XShell 里开三四十个窗口
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5055 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 91ms · UTC 02:58 · PVG 10:58 · LAX 18:58 · JFK 21:58
    ♥ Do have faith in what you're doing.