dsh安装指南
dsh批量管理linux服务器
一,安装dsh
切换到root用户,然后切换到work_home_yourname
wget http://www.netfort.gr.jp/~dancer/software/downloads/libdshconfig-0.20.9.tar.gz
tar zxvf libdshconfig-0.20.9.tar.gz
cd libdshconfig-0.20.9
./configure
出错记得修复(Ubuntu: configure error: C++ preprocessor "/lib/cpp" fails sanity check
apt-get install build-essential)
make && make install
wget http://www.netfort.gr.jp/~dancer/software/downloads/dsh-0.25.9.tar.gz
tar zxvf dsh-0.25.9.tar.gz
cd dsh-0.25.9
./configure
make && make install
ln -s /usr/local/lib/libdshconfig.so.1 /lib/
echo "/usr/local/lib/libdshconfig.so.1">> /etc/ld.so.conf
ldconfig
[root@localhost ~]# which dsh
/usr/local/bin/dsh
二,用法介绍:
切换回需要的用户.
mkdir .dsh
cd .dsh
touch how-to-use,内容如下:
dsh -M -r ssh -f file目录 --命令
dsh --help
-v –verbose Verbose output 详细模式输出
-q –quiet Quiet 安静模式输出
-M –show-machine-names Prepend the host name on output显示被控制主机的hostname
-H –hide-machine-names Do not prepend host name on output 不显示主机名(default)
-i –duplicate-input Duplicate input given to dsh
-b –bufsize Change buffer size used in input duplication
-m –machine [machinename] Execute on machine 主机名
-n –num-topology How to divide the machines
-a –all Execute on all machines 主机列表,默认列表在/root/.dsh/machines.list
-g –group [groupname] Execute on group member 指定主机名组,主机名组在/root/.dsh/group/
-f –file [file] Use the file as list of machines 选择主机列表
-r –remoteshell [shellname] Execute using shell (rsh/ssh) 指定远程工具,默认为rsh
-o –remoteshellopt [option] Option to give to shell
-h –help Give out this message
-w –wait-shell Sequentially execute shell 指定顺序运行,默认是并行
-c –concurrent-shell Execute shell concurrently
-F –forklimit [fork limit] Concurrent with limit on number
-V –version Give out version information
三,应用举例:
dsh -M -r ssh -m ~/a.txt -- hostname
dsh安装指南的更多相关文章
- nGrinder安装指南
NGrinder 由两个模块组成,其运行环境为 Oracle JDK 1.6 nGrinder controller web 应用程序,部署在Tomcat 6.x 或更高的版本 nGrinder A ...
- postgresql pgsql最新版安装指南及数据存储路径更改及主从配置
postgresql pgsql最新版安装指南及数据存储路径更改及主从配置 安装指南 首先在apt的list添加你当前系统版本对应的apt列表 目前官网有16.04,14.04,12.04 分别对应下 ...
- 全新 Mac 安装指南(编程篇)(环境变量、Shell 终端、SSH 远程连接)
注:本文专门用于指导对计算机编程与设计(尤其是互联网产品开发与设计)感兴趣的 Mac 新用户,如何在 Mac OS X 系统上配置开发与上网环境,另有<全新 Mac 安装指南(通用篇)>作 ...
- 全新 Mac 安装指南(通用篇)(推荐设置、软件安装、推荐软件)
注:本文将会不定期维护与更新,有需要的朋友请在 Github 上订阅该条 Issues:<全新 Mac 安装指南(通用篇)>. 在 Mac 电脑上只用 Windows 操作系统的同学请看到 ...
- ArchLinux安装指南
将ArchLinux作为进阶Linux发行版,主要看重滚动更新和深入理解Linux的安装过程. 由于是新手,所以先选择在公司电脑上用VMware来安装.然后渐进到借助U盘在win10笔记本上安装双系统 ...
- Linux环境中Openfire安装指南
Linux环境中Openfire安装指南 安装环境: 安装软件:Openfire 4_1_0 http://download.igniterealtime.org/openfire/openfire_ ...
- scrapy3_ 安装指南
安装指南 安装Scrapy 注解 请先阅读 平台安装指南. 下列的安装步骤假定您已经安装好下列程序: Python 2.7 Python Package: pip and setuptools. 现在 ...
- storm 原理简介及单机版安装指南——详细版【转】
storm 原理简介及单机版安装指南 本文翻译自: https://github.com/nathanmarz/storm/wiki/Tutorial 原文链接自:http://www.open-op ...
- mac osx 系统 brew install hadoop 安装指南
mac osx 系统 brew install hadoop 安装指南 brew install hadoop 配置 core-site.xml:配置hdfs文件地址(记得chmod 对应文件夹 ...
随机推荐
- MySQL5.6 新特性之GTID【转】
转自 MySQL5.6 新特性之GTID - jyzhou - 博客园http://www.cnblogs.com/zhoujinyi/p/4717951.html 背景: MySQL5.6在5.5的 ...
- 设计模式之笔记--命令模式(Command)
命令模式(Command) 定义 命令模式(Command),将一个请求封闭为一个对象,从而使你可以用不同的请求对客户进行参数化:对请求排除或记录请求日志,以及支持可撤销的操作. 类图 描述 Comm ...
- Feign 发送对象,对象含多个文件
Feign在发送文件时,可以使用Feign-form. 另一种方式,关键就是,要将文件转成Resource,然后使用Spring的MultivalueMap 本次发送的是个对象,对象里含有 文件对象数 ...
- python使用virtualenv
virtualenv是python的虚拟环境,可以同时存在多个不同的虚拟环境. #1.安装virtualenv pip install virtualenv #2.创建目录 mkdir myproje ...
- HDU 2544 最短路(floyd+bellman-ford+spfa+dijkstra队列优化)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2544 题目大意:找点1到点n的最短路(无向图) 练一下最短路... dijkstra+队列优化: #i ...
- 【ios开发之疑难杂症】xcode运行出现SpringBoard 无法启动应用程序(错误:7)
问题:xcode运行出现SpringBoard 无法启动应用程序(错误:7) 解决方案: 重启模拟器
- 使用CLion
CLion是JetBrains公司的一款C++的IDE.默认使用Cmake构建. ubuntu和fedora下的安装 在ubuntu下安装了CLion,和QtCreator相比: ibus输入法能输入 ...
- CSU 1351 Tree Counting
原题链接:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1351 DP题,毫无疑问.由于动态规划题目做得少.不熟悉,刚开始自己用f[i]表示用 i ...
- Ubuntu下Node.js开发起步之旅
因为忙其它的事,把Node.js的学习放下了快两个月了,世事变化还真快,发现很多东东都改变了,express已经升级到4.x了,变化还不小! 我原来的学习过程是在VirtualBox中安装Ubuntu ...
- js的浮点(小数)数+-*/
//除法 function accDiv(arg1,arg2){ var t1=0,t2=0,r1,r2; try{t1=arg1.toString().split(".")[1] ...