邯郸市网站建设,为什么我的电脑有些网站打不开,前端实战项目11套,hao123我的上网主页hao123CheungSSH比Ansible的使用更简单#xff0c;尤其是配置方面#xff01;而Ansible有的功能#xff0c; 我的这个程序一样有#xff0c;和Ansible一样是python开发#xff0c; 所以跟Ansible的模式一样#xff0c; 但是CheungSSH 操作更简单#xff01;配置更轻量#xf…CheungSSH比Ansible的使用更简单尤其是配置方面而Ansible有的功能 我的这个程序一样有和Ansible一样是python开发 所以跟Ansible的模式一样 但是CheungSSH 操作更简单配置更轻量输出显示更人性化而且可以专门为您做二次开发对企业的自动化需求量身定做您可以大致的看下功能表即可了解本软件的功能功能表1名称功能解释本软件AutoSSH是否支持Ansible是否支持2批量分发命令在您的本地输入一条命令程序将会自动把这些命令发送给远程多个服务器执行支持支持3批量上传文件在您的本地执行获取远程服务器的文件到本地原理跟SFTP一样但是这里是多个服务器同时执行SFTP支持支持4批量下载文件(正则匹配)在您的本地执行上传远程服务器的文件到远程服务器原理跟SFTP一样但是这里是同时为多个服务器执行SFTP并且支持正则表达式的匹配比如,您想下载服务器上Tomcat在5月~8月的日志到本地查看: tomcat/logs2015-0[5-8].*.log支持支持5多线程为多个服务器同时执行这样能减少执行的时间加快执行效率尤其是在服务器较多的情况下支持支持6自定义输出格式为了更人性化的显示执行结果 您可以自行编写一个脚本对结果内容进行重新格式化输出只为了方便您的查看支持不支持7格式化日志入库程序执行的命令和结果都将写入日志文件中加入您在每天早上要执行巡检CPU MEM IO DISK 的信息比如命令df -h|grep ‘/’ 得到结果 96% ,那么这些结果都将会格式化的写入日志中同事也省去了您整理输出信息的时间。提高工作效率支持不支持8命令结果返回状态判断每个命令执行是否成功成功了多少 用时多少都会显示支持支持9su root权限假如您的服务器只能以普通账户登录而您平时又是用普通用户登录后su – root执行命令这里也支持。支持不支持10结果统计执行的命令条数成功数用时等。支持不支持11自助区分每个服务器的返回结果都以特定格式区分开来方便查看支持不支持12交互界面可以在程序里面进行批量发送命令就像是Linux的shell终端一样支持不支持13后台运行以命令的方式运行比如您把命令写入一个脚本中然后用crond每天早上为您自动为多个服务器巡检 .Auto_SSH_Manager_Stand_V71.0.py 支持支持14模块化接口每个命令功能都是一样以模块执行所以跟Ansible是一样的原理但是我认为比Ansibel更人性化支持支持15二次开发有API接口 如果您想要针对您的工作进行进一步的开发那么也是可以的支持支持16本地脚本在远程服务器运行(远程服务器没有脚本)您在本地编写一个脚本或者是程序或者是可执行文件在远程服务器上事先不需要存在该脚本而您可以直接在远程服务器上运行犹如在普通的Shell终端下先上传一个程序文件然后在远程服务器上执行而我们这里的区别是无需您手动上传即可执行支持支持17自动化巡检比如您可以在crontd中编写一条命令 定时为您的多个服务器进行巡检操作巡检的结果将会格式化的写入本地日志提支持不支持18不同文件上传到不同服务器上比如您部署Tomcat Weblogic集群的时候有可能每一个Tomcat节点的配置文件都不同那么可以采用此模式进行上传配置文件开发中不支持19部署模式比如您时常部署Tomcat程序 Weblogic程序等部署的服务器需要部署完成一台才能进行下一台的操作。很多企业都是这样支持不支持20密码方式登录密码登陆与Shell一样支持支持21密钥方式登录PublicKey登陆与Shell一样支持支持实现架构安装及使用下载方式(您只需要选择一种合适您的下载方式即可)第一种方式 如果您的Linux有git命令那么请使用以下这种方式下载#git clone https://github.com/zhangqichuan/CheungSSH.git下载成功后会在您的当前目录有一个CheungSSH的目录里面就是本软件的所有程序了。第二种方式 如果您的Linux上没有git命令那么请使用以下方式进行下载(1)在您的浏览器地址栏输入 https://github.com/zhangqichuan/CheungSSH(2)点击Download ZIP就可以了然后您可以unzip CheungSSH.zip 解压即可#cd /home/tools/#cd CheungSSH#cd CheungSSH-master //通过浏览器下载#chmod x *安装方式第一种方式(自动安装方式)#./install-CheungSSH.shInstalling…您的系统没有python-devle包现在需要安装…安装python-devel成功/usr/bin/pipDownloading/unpacking pycryptoDownloading pycrypto-2.6.1.tar.gz (446kB): 446kB downloadedRunning setup.py egg_info for package pycrypto/tmp/pip_build_root/pycrypto/setup.py:11: DeprecationWarning: Parameters to load are deprecated. Call .resolve and .require separately.# This file contains code from the Python 2.2 setup.py module (theInstalling collected packages: pycryptoRunning setup.py install for pycryptochecking for gcc… gccchecking whether the C compiler works… yeschecking for C compiler default output file name… a.outchecking for suffix of executables…checking whether we are cross compiling… nochecking for suffix of object files… ochecking whether we are using the GNU C compiler… yeschecking whether gcc accepts -g… yeschecking for gcc option to accept ISO C89… none neededchecking for __gmpz_init in -lgmp… nochecking for __gmpz_init in -lmpir… nochecking whether mpz_powm is declared… nochecking whether mpz_powm_sec is declared… nochecking how to run the C preprocessor… gcc -Echecking for grep that handles long lines and -e… /bin/grepchecking for egrep… /bin/grep -Echecking for ANSI C header files… yeschecking for sys/types.h… yeschecking for sys/stat.h… yeschecking for stdlib.h… yeschecking for string.h… yeschecking for memory.h… yeschecking for strings.h… yeschecking for inttypes.h… yeschecking for stdint.h… yeschecking for unistd.h… yeschecking for inttypes.h… (cached) yeschecking limits.h usability… yeschecking limits.h presence… yeschecking for limits.h… yeschecking stddef.h usability… yeschecking stddef.h presence… yeschecking for stddef.h… yeschecking for stdint.h… (cached) yeschecking for stdlib.h… (cached) yeschecking for string.h… (cached) yeschecking wchar.h usability… yeschecking wchar.h presence… yeschecking for wchar.h… yeschecking for inline… inlinechecking for int16_t… yeschecking for int32_t… yeschecking for int64_t… yeschecking for int8_t… yeschecking for size_t… yeschecking for uint16_t… yeschecking for uint32_t… yeschecking for uint64_t… yeschecking for uint8_t… yeschecking for stdlib.h… (cached) yeschecking for GNU libc compatible malloc… yeschecking for memmove… yeschecking for memset… yesconfigure: creating ./config.statusconfig.status: creating src/config.hwarning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.building ‘Crypto.Hash._MD2’ extensiongcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -fPIC -stdc99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.6 -c src/MD2.c -o build/temp.linux-x86_64-2.6/src/MD2.o在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/MD2.c31:/usr/include/python2.6/pyconfig-64.h:1034:1: 警告“_POSIX_C_SOURCE”重定义在包含自 /usr/include/string.h27 的文件中从 src/MD2.c30:/usr/include/features.h:162:1: 警告这是先前定义的位置在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/MD2.c31:/usr/include/python2.6/pyconfig-64.h:1043:1: 警告“_XOPEN_SOURCE”重定义在包含自 /usr/include/string.h27 的文件中从 src/MD2.c30:/usr/include/features.h:164:1: 警告这是先前定义的位置gcc -pthread -shared build/temp.linux-x86_64-2.6/src/MD2.o -L/usr/lib64 -lpython2.6 -o build/lib.linux-x86_64-2.6/Crypto/Hash/_MD2.sobuilding ‘Crypto.Hash._MD4’ extensiongcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -fPIC -stdc99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.6 -c src/MD4.c -o build/temp.linux-x86_64-2.6/src/MD4.o在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/MD4.c31:/usr/include/python2.6/pyconfig-64.h:1034:1: 警告“_POSIX_C_SOURCE”重定义在包含自 /usr/include/string.h27 的文件中从 src/MD4.c30:/usr/include/features.h:162:1: 警告这是先前定义的位置在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/MD4.c31:/usr/include/python2.6/pyconfig-64.h:1043:1: 警告“_XOPEN_SOURCE”重定义在包含自 /usr/include/string.h27 的文件中从 src/MD4.c30:/usr/include/features.h:164:1: 警告这是先前定义的位置gcc -pthread -shared build/temp.linux-x86_64-2.6/src/MD4.o -L/usr/lib64 -lpython2.6 -o build/lib.linux-x86_64-2.6/Crypto/Hash/_MD4.sobuilding ‘Crypto.Hash._SHA256’ extensiongcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -fPIC -stdc99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.6 -c src/SHA256.c -o build/temp.linux-x86_64-2.6/src/SHA256.o在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/hash_SHA2_template.c33从 src/SHA256.c72:/usr/include/python2.6/pyconfig-64.h:1034:1: 警告“_POSIX_C_SOURCE”重定义在包含自 /usr/include/stdint.h26 的文件中从 src/hash_SHA2.h72从 src/SHA256.c35:/usr/include/features.h:162:1: 警告这是先前定义的位置在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/hash_SHA2_template.c33从 src/SHA256.c72:/usr/include/python2.6/pyconfig-64.h:1043:1: 警告“_XOPEN_SOURCE”重定义在包含自 /usr/include/stdint.h26 的文件中从 src/hash_SHA2.h72从 src/SHA256.c35:/usr/include/features.h:164:1: 警告这是先前定义的位置gcc -pthread -shared build/temp.linux-x86_64-2.6/src/SHA256.o -L/usr/lib64 -lpython2.6 -o build/lib.linux-x86_64-2.6/Crypto/Hash/_SHA256.sobuilding ‘Crypto.Hash._SHA224’ extensiongcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -fPIC -stdc99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.6 -c src/SHA224.c -o build/temp.linux-x86_64-2.6/src/SHA224.o在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/hash_SHA2_template.c33从 src/SHA224.c73:/usr/include/python2.6/pyconfig-64.h:1034:1: 警告“_POSIX_C_SOURCE”重定义在包含自 /usr/include/stdint.h26 的文件中从 src/hash_SHA2.h72从 src/SHA224.c36:/usr/include/features.h:162:1: 警告这是先前定义的位置在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/hash_SHA2_template.c33从 src/SHA224.c73:/usr/include/python2.6/pyconfig-64.h:1043:1: 警告“_XOPEN_SOURCE”重定义在包含自 /usr/include/stdint.h26 的文件中从 src/hash_SHA2.h72从 src/SHA224.c36:/usr/include/features.h:164:1: 警告这是先前定义的位置gcc -pthread -shared build/temp.linux-x86_64-2.6/src/SHA224.o -L/usr/lib64 -lpython2.6 -o build/lib.linux-x86_64-2.6/Crypto/Hash/_SHA224.sobuilding ‘Crypto.Hash._SHA384’ extensiongcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -fPIC -stdc99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.6 -c src/SHA384.c -o build/temp.linux-x86_64-2.6/src/SHA384.o在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/hash_SHA2_template.c33从 src/SHA384.c80:/usr/include/python2.6/pyconfig-64.h:1034:1: 警告“_POSIX_C_SOURCE”重定义在包含自 /usr/include/stdint.h26 的文件中从 src/hash_SHA2.h72从 src/SHA384.c36:/usr/include/features.h:162:1: 警告这是先前定义的位置在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/hash_SHA2_template.c33从 src/SHA384.c80:/usr/include/python2.6/pyconfig-64.h:1043:1: 警告“_XOPEN_SOURCE”重定义在包含自 /usr/include/stdint.h26 的文件中从 src/hash_SHA2.h72从 src/SHA384.c36:/usr/include/features.h:164:1: 警告这是先前定义的位置gcc -pthread -shared build/temp.linux-x86_64-2.6/src/SHA384.o -L/usr/lib64 -lpython2.6 -o build/lib.linux-x86_64-2.6/Crypto/Hash/_SHA384.sobuilding ‘Crypto.Hash._SHA512’ extensiongcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -fPIC -stdc99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.6 -c src/SHA512.c -o build/temp.linux-x86_64-2.6/src/SHA512.o在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/hash_SHA2_template.c33从 src/SHA512.c80:/usr/include/python2.6/pyconfig-64.h:1034:1: 警告“_POSIX_C_SOURCE”重定义在包含自 /usr/include/stdint.h26 的文件中从 src/hash_SHA2.h72从 src/SHA512.c36:/usr/include/features.h:162:1: 警告这是先前定义的位置在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/hash_SHA2_template.c33从 src/SHA512.c80:/usr/include/python2.6/pyconfig-64.h:1043:1: 警告“_XOPEN_SOURCE”重定义在包含自 /usr/include/stdint.h26 的文件中从 src/hash_SHA2.h72从 src/SHA512.c36:/usr/include/features.h:164:1: 警告这是先前定义的位置gcc -pthread -shared build/temp.linux-x86_64-2.6/src/SHA512.o -L/usr/lib64 -lpython2.6 -o build/lib.linux-x86_64-2.6/Crypto/Hash/_SHA512.sobuilding ‘Crypto.Hash._RIPEMD160’ extensiongcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -fPIC -stdc99 -O3 -fomit-frame-pointer -DPCT_LITTLE_ENDIAN1 -Isrc/ -I/usr/include/python2.6 -c src/RIPEMD160.c -o build/temp.linux-x86_64-2.6/src/RIPEMD160.o在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/RIPEMD160.c57:/usr/include/python2.6/pyconfig-64.h:1034:1: 警告“_POSIX_C_SOURCE”重定义在包含自 /usr/include/stdint.h26 的文件中从 src/RIPEMD160.c48:/usr/include/features.h:162:1: 警告这是先前定义的位置在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/RIPEMD160.c57:/usr/include/python2.6/pyconfig-64.h:1043:1: 警告“_XOPEN_SOURCE”重定义在包含自 /usr/include/stdint.h26 的文件中从 src/RIPEMD160.c48:/usr/include/features.h:164:1: 警告这是先前定义的位置gcc -pthread -shared build/temp.linux-x86_64-2.6/src/RIPEMD160.o -L/usr/lib64 -lpython2.6 -o build/lib.linux-x86_64-2.6/Crypto/Hash/_RIPEMD160.sobuilding ‘Crypto.Cipher._AES’ extensiongcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -fPIC -stdc99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.6 -c src/AES.c -o build/temp.linux-x86_64-2.6/src/AES.o在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/AES.c29:/usr/include/python2.6/pyconfig-64.h:1034:1: 警告“_POSIX_C_SOURCE”重定义在包含自 /usr/include/assert.h37 的文件中从 src/AES.c27:/usr/include/features.h:162:1: 警告这是先前定义的位置在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/AES.c29:/usr/include/python2.6/pyconfig-64.h:1043:1: 警告“_XOPEN_SOURCE”重定义在包含自 /usr/include/assert.h37 的文件中从 src/AES.c27:/usr/include/features.h:164:1: 警告这是先前定义的位置gcc -pthread -shared build/temp.linux-x86_64-2.6/src/AES.o -L/usr/lib64 -lpython2.6 -o build/lib.linux-x86_64-2.6/Crypto/Cipher/_AES.sobuilding ‘Crypto.Cipher._ARC2’ extensiongcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -fPIC -stdc99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.6 -c src/ARC2.c -o build/temp.linux-x86_64-2.6/src/ARC2.o在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/ARC2.c45:/usr/include/python2.6/pyconfig-64.h:1034:1: 警告“_POSIX_C_SOURCE”重定义在包含自 /usr/include/string.h27 的文件中从 src/ARC2.c44:/usr/include/features.h:162:1: 警告这是先前定义的位置在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/ARC2.c45:/usr/include/python2.6/pyconfig-64.h:1043:1: 警告“_XOPEN_SOURCE”重定义在包含自 /usr/include/string.h27 的文件中从 src/ARC2.c44:/usr/include/features.h:164:1: 警告这是先前定义的位置gcc -pthread -shared build/temp.linux-x86_64-2.6/src/ARC2.o -L/usr/lib64 -lpython2.6 -o build/lib.linux-x86_64-2.6/Crypto/Cipher/_ARC2.sobuilding ‘Crypto.Cipher._Blowfish’ extensiongcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -fPIC -stdc99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.6 -c src/Blowfish.c -o build/temp.linux-x86_64-2.6/src/Blowfish.o在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/Blowfish.c39:/usr/include/python2.6/pyconfig-64.h:1034:1: 警告“_POSIX_C_SOURCE”重定义在包含自 /usr/include/stdint.h26 的文件中从 src/Blowfish.c31:/usr/include/features.h:162:1: 警告这是先前定义的位置在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/Blowfish.c39:/usr/include/python2.6/pyconfig-64.h:1043:1: 警告“_XOPEN_SOURCE”重定义在包含自 /usr/include/stdint.h26 的文件中从 src/Blowfish.c31:/usr/include/features.h:164:1: 警告这是先前定义的位置gcc -pthread -shared build/temp.linux-x86_64-2.6/src/Blowfish.o -L/usr/lib64 -lpython2.6 -o build/lib.linux-x86_64-2.6/Crypto/Cipher/_Blowfish.sobuilding ‘Crypto.Cipher._CAST’ extensiongcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -fPIC -stdc99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.6 -c src/CAST.c -o build/temp.linux-x86_64-2.6/src/CAST.ogcc -pthread -shared build/temp.linux-x86_64-2.6/src/CAST.o -L/usr/lib64 -lpython2.6 -o build/lib.linux-x86_64-2.6/Crypto/Cipher/_CAST.sobuilding ‘Crypto.Cipher._DES’ extensiongcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -fPIC -stdc99 -O3 -fomit-frame-pointer -Isrc/ -Isrc/libtom/ -I/usr/include/python2.6 -c src/DES.c -o build/temp.linux-x86_64-2.6/src/DES.o在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/DES.c37:/usr/include/python2.6/pyconfig-64.h:1034:1: 警告“_POSIX_C_SOURCE”重定义在包含自 /usr/include/assert.h37 的文件中从 src/libtom/tomcrypt.h3从 src/libtom/tomcrypt_des.c11从 src/DES.c32:/usr/include/features.h:162:1: 警告这是先前定义的位置在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/DES.c37:/usr/include/python2.6/pyconfig-64.h:1043:1: 警告“_XOPEN_SOURCE”重定义在包含自 /usr/include/assert.h37 的文件中从 src/libtom/tomcrypt.h3从 src/libtom/tomcrypt_des.c11从 src/DES.c32:/usr/include/features.h:164:1: 警告这是先前定义的位置gcc -pthread -shared build/temp.linux-x86_64-2.6/src/DES.o -L/usr/lib64 -lpython2.6 -o build/lib.linux-x86_64-2.6/Crypto/Cipher/_DES.sobuilding ‘Crypto.Cipher._DES3’ extensiongcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -fPIC -stdc99 -O3 -fomit-frame-pointer -Isrc/ -Isrc/libtom/ -I/usr/include/python2.6 -c src/DES3.c -o build/temp.linux-x86_64-2.6/src/DES3.o在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/DES.c37从 src/DES3.c26:/usr/include/python2.6/pyconfig-64.h:1034:1: 警告“_POSIX_C_SOURCE”重定义在包含自 /usr/include/assert.h37 的文件中从 src/libtom/tomcrypt.h3从 src/libtom/tomcrypt_des.c11从 src/DES.c32从 src/DES3.c26:/usr/include/features.h:162:1: 警告这是先前定义的位置在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/DES.c37从 src/DES3.c26:/usr/include/python2.6/pyconfig-64.h:1043:1: 警告“_XOPEN_SOURCE”重定义在包含自 /usr/include/assert.h37 的文件中从 src/libtom/tomcrypt.h3从 src/libtom/tomcrypt_des.c11从 src/DES.c32从 src/DES3.c26:/usr/include/features.h:164:1: 警告这是先前定义的位置gcc -pthread -shared build/temp.linux-x86_64-2.6/src/DES3.o -L/usr/lib64 -lpython2.6 -o build/lib.linux-x86_64-2.6/Crypto/Cipher/_DES3.sobuilding ‘Crypto.Cipher._ARC4’ extensiongcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -fPIC -stdc99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.6 -c src/ARC4.c -o build/temp.linux-x86_64-2.6/src/ARC4.ogcc -pthread -shared build/temp.linux-x86_64-2.6/src/ARC4.o -L/usr/lib64 -lpython2.6 -o build/lib.linux-x86_64-2.6/Crypto/Cipher/_ARC4.sobuilding ‘Crypto.Cipher._XOR’ extensiongcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -fPIC -stdc99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.6 -c src/XOR.c -o build/temp.linux-x86_64-2.6/src/XOR.ogcc -pthread -shared build/temp.linux-x86_64-2.6/src/XOR.o -L/usr/lib64 -lpython2.6 -o build/lib.linux-x86_64-2.6/Crypto/Cipher/_XOR.sobuilding ‘Crypto.Util.strxor’ extensiongcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -fPIC -stdc99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.6 -c src/strxor.c -o build/temp.linux-x86_64-2.6/src/strxor.ogcc -pthread -shared build/temp.linux-x86_64-2.6/src/strxor.o -L/usr/lib64 -lpython2.6 -o build/lib.linux-x86_64-2.6/Crypto/Util/strxor.sobuilding ‘Crypto.Util._counter’ extensiongcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE2 -fexceptions -fstack-protector –paramssp-buffer-size4 -m64 -mtunegeneric -D_GNU_SOURCE -fPIC -fwrapv -fPIC -stdc99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.6 -c src/_counter.c -o build/temp.linux-x86_64-2.6/src/_counter.o在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/_counter.c28:/usr/include/python2.6/pyconfig-64.h:1034:1: 警告“_POSIX_C_SOURCE”重定义在包含自 /usr/include/assert.h37 的文件中从 src/_counter.c25:/usr/include/features.h:162:1: 警告这是先前定义的位置在包含自 /usr/include/python2.6/pyconfig.h6 的文件中从 /usr/include/python2.6/Python.h8从 src/_counter.c28:/usr/include/python2.6/pyconfig-64.h:1043:1: 警告“_XOPEN_SOURCE”重定义在包含自 /usr/include/assert.h37 的文件中从 src/_counter.c25:/usr/include/features.h:164:1: 警告这是先前定义的位置gcc -pthread -shared build/temp.linux-x86_64-2.6/src/_counter.o -L/usr/lib64 -lpython2.6 -o build/lib.linux-x86_64-2.6/Crypto/Util/_counter.soSuccessfully installed pycryptoCleaning up…安装pycrypto成功Downloading/unpacking paramikoDownloading paramiko-1.15.2.tar.gz (1.2MB): 1.2MB downloadedRunning setup.py egg_info for package paramiko/tmp/pip_build_root/paramiko/setup.py:11: DeprecationWarning: Parameters to load are deprecated. Call .resolve and .require separately.# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FORRequirement already satisfied (use –upgrade to upgrade): pycrypto!2.4,2.1 in /usr/lib64/python2.6/site-packages (from paramiko)Downloading/unpacking ecdsa0.11 (from paramiko)Downloading ecdsa-0.13.tar.gz (55kB): 55kB downloadedRunning setup.py egg_info for package ecdsa/tmp/pip_build_root/ecdsa/setup.py:11: DeprecationWarning: Parameters to load are deprecated. Call .resolve and .require separately.versioneer.versionfile_source “ecdsa/_version.py”Installing collected packages: paramiko, ecdsaRunning setup.py install for paramikoRunning setup.py install for ecdsagot version from file /tmp/pip_build_root/ecdsa/ecdsa/_version.py {‘version’: ‘0.13’, ‘full’: ‘5a6fc047222cf21ad89f6cbf8782d0f1e3ddacda’}UPDATING build/lib/ecdsa/_version.pySuccessfully installed paramiko ecdsaCleaning up…安装paramiko成功恭喜您已经安装好了环境接下来请您使用 ./cheungSSH_Manager_Stand_V92_ISSUE.py 启动程序第二种方式(手动安装方式在第一种方式失败后您可以使用这种方式安装如果第一种方式成功那么就不需要使用这个方式安装)假如您使用自动的安装方式 ./install-CheungSSH.sh 失败了那么请您使用如下方法手动安装哦#yum install -y gcc python-devel#wget –no-check-certificate https://pypi.python.org/packages/source/p/pycrypto/pycrypto-2.6.1.tar.gz#tar xvf pycrypto-2.6.1.tar.gz ;cd pycrypto-2.6.1;python setup.py install#wget –no-check-certificate https://pypi.python.org/packages/source/p/paramiko/paramiko-1.9.0.tar.gz#tar xvf paramiko-1.9.0.tar.gz ;cd paramiko-1.9.0 ;python setup.py install#./cheungSSH_Manager_Stand_V94_ISSUE.py //先执行一下会生成一些初始化配置文件CMDexit //然后退出就算部署好了接下来就可以修改配置文件就能使用啦#more /cheung/conf/cheung.conf //先看看配置文件[CheungSSH]#AuthorCheung Kei-Chuen#QQ741345015Serverslocalhost,127.0.0.1,www.baidu.com //这里是远程服务器的IP也就是被管理的服务器UsernameYourServerCount //服务器对应的账户名也就是远程服务器上的账户名PasswordYourcount-Password //服务器对应的账户password也就是远程服务器上的账户passwordUserootN //是否使用su -root我设计的是既可以su –root也可以sudo就是没有设计成Ansible的sudo 还要加su 我认为那是繁琐的。//如果您是刚刚使用我的程序您只需要配置以上就行了以上是基本的配置 以下是高级配置哦#localhost_Userapache //如果您的众多服务器中有些服务器的用户名不尽相同那么您可以在此处指定额外的用户名比如www.baidu.com_Useradministrator#localhost_Passwordapache-password //服务器对应的账户password也就是远程服务器上的账户password#localhost_Port222 //端口号#如果您的每个服务器的账户对应的密码不是都一样那么您可以使用这个配置#Passwordrootroot-password //如果使用了su – root此处需要指定root的password#Timeout10 //指定登陆服务器的响应超时时间RunModeM //使用多线程运行程序UseKeyn //是否使用密钥登录Deploymentn //是否使用部署模式比如在更新TomcatApache 的时候需要逐一进行部署使用该模式后程序会结果您指定的日志信息进行判断重启是否成功如果成功则自动进行下一个服务器的部署。否则会有提示#ListenFile/var/log/messages //使用了部署模式后您需要制定一个日志文件 让程序去读取您指定的关键信息#ListenTime60 //#使用了部署模式后程序读取您指定的日志信息时间默认为60秒钟如果在指定时间未读取到相关信息则认为部署失败#ListenCharServer startup //使用了部署模式后 您指定的字符信息如果读取到这个信息那么就认为部署成功 服务器将自动进行下一个部署比如tomcat中如果出现这个字符那么可以认为是启动成功了的当然要排除启动后的一些404,500错误。因为这里只判断启动是否成功Port22 //远程服务器的端口默认是22IP_Port //不同服务器的不同端口 可以此处指定。测试1、每个服务器的密码都相同的情况下适用于测试环境和开发环境代码部署。配置文件如下#more /cheung/conf/cheung.conf[CheungSSH]#AuthorCheung Kei-Chuen#QQ741345015Servers192.168.1.3,192.168.1.4UsernamerootPassword123456UserootN#localhost_Userapache#localhost_Passwordapache-password#localhost_Port222#如果您的每个服务器的账户对应的密码不是都一样那么您可以使用这个配置#Passwordrootroot-password#Timeout10RunModeMUseKeynDeploymentn#ListenFile/var/log/messages#ListenTime60#ListenCharServer startupPort22#/cheungSSH_Manager_Stand_V94_ISSUE.pyServers:2|RunMode:M|UseKey:n|Deployment:nCMDmkdir /home/test/——————————————————————–||OK 192.168.1.4 (0.57 Sec, All 2 Done 1 Cmd:Sucess)————————————————————————–——————————————————————–||OK 192.168.1.3 (0.63 Sec, All 2 Done 2 Cmd:Sucess)————————————————————————–Done (Succ:2,Fail:0, 0.64Sec GUN/Linux Cheung Kei-Chuen All Right Reserved)CMDexit到192.168.1.3和192.168.1.4上的home目下去查看是否有test目录经过查看是存在的。在执行命令的时候要输入完整的路径。2、不同账户密码和不同端口号适用于生产环境配置如下#cat /cheung/conf/cheung.conf[CheungSSH]#AuthorCheung Kei-Chuen#QQ741345015Servers127.0.0.1UsernamerootPassword123456UserootN192.168.1.91_Userroot192.168.1.254_Userroot192.168.1.91_Passwordxxxxxx192.168.1.254_Passwordxxxxxxxxxxxx192.168.1.254_Port13420#如果您的每个服务器的账户对应的密码不是都一样那么您可以使用这个配置#Passwordrootroot-password#Timeout10RunModeMUseKeynDeploymentn#ListenFile/var/log/messages#ListenTime60#ListenCharServer startupPort22#./cheungSSH_Manager_Stand_V94_ISSUE.pyServers:3|RunMode:M|UseKey:n|Deployment:nCMDdf -h——————————————————————|文件系统 容量 已用 可用 已用%% 挂载点|/dev/mapper/vg_mazhenguo-lv_root| 18G 3.2G 14G 20% /|tmpfs 495M 0 495M 0% /dev/shm|/dev/sda1 485M 29M 431M 7% /boot||OK 127.0.0.1 (0.68 Sec, All 3 Done 1 Cmd:Sucess)———————————————————————————————————————————————-|文件系统 容量 已用 可用 已用%% 挂载点|/dev/sda2 50G 7.3G 40G 16% /|tmpfs 1.9G 72K 1.9G 1% /dev/shm|/dev/sda1 194M 56M 128M 31% /boot|/dev/sda5 178G 63G 106G 38% /home||OK 192.168.1.254 (0.67 Sec, All 3 Done 2 Cmd:Sucess)—————————————————————————-———————————————————————|文件系统 容量 已用 可用 已用% 挂载点|/dev/sda2 49G 2.7G 47G 6% /|devtmpfs 1.4G 0 1.4G 0% /dev|tmpfs 1.4G 0 1.4G 0% /dev/shm|tmpfs 1.4G 8.5M 1.4G 1% /run|tmpfs 1.4G 0 1.4G 0% /sys/fs/cgroup|/dev/sda5 180G 4.7G 176G 3% /home|/dev/sda1 2.0G 121M 1.9G 6% /boot||OK 192.168.1.91 (0.69 Sec, All 3 Done 3 Cmd:Sucess)—————————————————————————Done (Succ:3,Fail:0, 0.80Sec GUN/Linux Cheung Kei-Chuen All Right Reserved)远程执行脚本在您本地的脚本让他在远程服务器上运行事先远程服务器上没有这个脚本的哦应用场景比如您要对服务器执行一个脚本内容 而事先无需让这个脚本在远程服务器上存在只需要 在本地程序上运行就能让远程服务器上运行了哦#cd /home/crontab/#vim ip.sh#!/bin/bashecho “远端服务器:“/sbin/ifconfig|awk-F “( *)|:“ ‘{if ($0~”inet6″) next; } {if($0~/127.0.0.1/) next;} $0~/inet/{print $4}‘保存退出#chmod x ip.sh#./cheungSSH_Manager_Stand_V94_ISSUE.py-fServers:3|RunMode:M|UseKey:n|Deployment:nCMD/home/crontab/ip.sh——————————————————————|远端服务器:|192.168.1.2||OK 127.0.0.1 (0.56 Sec, All 3 Done 1Cmd:Sucess)———————————————————————————————————————————————-|远端服务器:|192.168.1.254||OK 192.168.1.254 (0.57 Sec, All 3 Done 2Cmd:Sucess)—————————————————————————-———————————————————————|远端服务器:|netmask||OK 192.168.1.91 (0.38 Sec, All 3 Done 3Cmd:Sucess)—————————————————————————Done (Succ:3,Fail:0, 2.42Sec GUN/Linux Cheung Kei-Chuen All Right Reserved)CMD常用命令(所有的Linux系统命令但是不包括交互式的命令 例如top交互vi交互)举例CMDdf -h|awk ‘$NF”/”{print $(NF-1)}’ //检查您的根 “/” 分区使用量CMDtop -b -d 1 -n 1 //查看服务器的top信息CMD/etc/init.d/mysqld restart //重启mysql服务执行这个之后所有服务器的mysql服务都会被重启。#echo -e ‘awk -F’”{print $NF} END{print “\n”}’ /cheung/logs/cheungssh.log’#./cheungSSH_Manager_Stand_V94_ISSUE.py -t download -s /home/nginx.conf -d /home/mazhenguo/ //从多个服务器下载单个文件到执行命令的服务器上。-s后面是要下载的文件-d后面是存储到本地的目录最后的文件会在文件名后面加上_服务器的IP。#./cheungSSH_Manager_Stand_V94_ISSUE.py -t download -s ‘/home/log/www.baidu.com/localhost_2015-06-0[1-4].txt’ -d /home/mazhenguo/ -r //日志是按天切割的。#./cheungSSH_Manager_Stand_V94_ISSUE.py -t download -s ‘/home/log/www.baidu.com/access-201506[01*-04*]’ -d /home/mazhenguo/ -r //日志是按小时分割的只要符合正则就行。#./cheungSSH_Manager_Stand_V94_ISSUE.py -t upload -s /usr/local/nginx/nginx.conf -d /usr/local/nginx/nginx.conf //上传单个文件到多台服务器的上。