cevincheung
V2EX  ›  DevOps

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

  •  
  •   cevincheung · Dec 13, 2014 · 6776 views
    This topic created in 4218 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
        1
    Livid  
    MOD
    PRO
       Dec 13, 2014   ❤️ 3
    cd 是为了切换当前工作目录吧,那执行完了之后应该还有其他后续的指令。

    看一下 Ansible Playbook 吧:

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

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


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