cheungssh mysql密码_CheungSSH安装及基本使用
CheungSSH比Ansible的使用更簡單,尤其是配置方面!而Ansible有的功能, 我的這個(gè)程序一樣有,和Ansible一樣是python開發(fā), 所以跟Ansible的模式一樣, 但是CheungSSH?操作更簡單!配置更輕量!輸出顯示更人性化!而且,可以專門為您做二次開發(fā),對企業(yè)的自動(dòng)化需求量身定做!
您可以大致的看下功能表,即可了解本軟件的功能
功能表:
1
名稱
功能解釋
本軟件AutoSSH是否支持
Ansible是否支持
2
批量分發(fā)命令
在您的本地輸入一條命令,程序?qū)?huì)自動(dòng)把這些命令發(fā)送給遠(yuǎn)程多個(gè)服務(wù)器執(zhí)行
支持
支持
3
批量上傳文件
在您的本地執(zhí)行獲取遠(yuǎn)程服務(wù)器的文件到本地,原理跟SFTP一樣,但是這里是多個(gè)服務(wù)器同時(shí)執(zhí)行SFTP
支持
支持
4
批量下載文件(正則匹配)
在您的本地執(zhí)行上傳遠(yuǎn)程服務(wù)器的文件到遠(yuǎn)程服務(wù)器,原理跟SFTP一樣,但是這里是同時(shí)為多個(gè)服務(wù)器執(zhí)行SFTP,并且支持正則表達(dá)式的匹配,比如,您想下載服務(wù)器上Tomcat在5月~8月的日志到本地查看: tomcat/logs2015-0[5-8].*.log
支持
支持
5
多線程
為多個(gè)服務(wù)器同時(shí)執(zhí)行,這樣能減少執(zhí)行的時(shí)間,加快執(zhí)行效率,尤其是在服務(wù)器較多的情況下
支持
支持
6
自定義輸出格式
為了更人性化的顯示執(zhí)行結(jié)果, 您可以自行編寫一個(gè)腳本對結(jié)果內(nèi)容進(jìn)行重新格式化輸出,只為了方便您的查看
支持
不支持
7
格式化日志入庫
程序執(zhí)行的命令和結(jié)果,都將寫入日志文件中,加入您在每天早上要執(zhí)行巡檢CPU MEM ?IO ?DISK 的信息,比如命令:df -h|grep ‘/’ 得到結(jié)果 96% ,那么這些結(jié)果都將會(huì)格式化的寫入日志中,同事也省去了您整理輸出信息的時(shí)間。提高工作效率
支持
不支持
8
命令結(jié)果返回狀態(tài)判斷
每個(gè)命令執(zhí)行是否成功,成功了多少, 用時(shí)多少,都會(huì)顯示
支持
支持
9
su root權(quán)限
假如您的服務(wù)器只能以普通賬戶登錄,而您平時(shí)又是用普通用戶登錄后su ?– root執(zhí)行命令,這里也支持。
支持
不支持
10
結(jié)果統(tǒng)計(jì)
執(zhí)行的命令條數(shù),成功數(shù),用時(shí)等。
支持
不支持
11
自助區(qū)分
每個(gè)服務(wù)器的返回結(jié)果,都以特定格式區(qū)分開來,方便查看
支持
不支持
12
交互界面
可以在程序里面進(jìn)行批量發(fā)送命令,就像是Linux的shell終端一樣
支持
不支持
13
后臺(tái)運(yùn)行
以命令的方式運(yùn)行,比如您把命令寫入一個(gè)腳本中,然后用crond每天早上為您自動(dòng)為多個(gè)服務(wù)器巡檢 .Auto_SSH_Manager_Stand_V71.0.py ?<
支持
支持
14
模塊化接口
每個(gè)命令功能,都是一樣以模塊執(zhí)行,所以跟Ansible是一樣的原理,但是我認(rèn)為比Ansibel更人性化
支持
支持
15
二次開發(fā)
有API接口, 如果您想要針對您的工作進(jìn)行進(jìn)一步的開發(fā),那么也是可以的
支持
支持
16
本地腳本在遠(yuǎn)程服務(wù)器運(yùn)行(遠(yuǎn)程服務(wù)器沒有腳本)
您在本地編寫一個(gè)腳本,或者是程序,或者是可執(zhí)行文件,在遠(yuǎn)程服務(wù)器上事先不需要存在該腳本,而您可以直接在遠(yuǎn)程服務(wù)器上運(yùn)行,猶如在普通的Shell終端下,先上傳一個(gè)程序文件,然后在遠(yuǎn)程服務(wù)器上執(zhí)行,而我們這里的區(qū)別是,無需您手動(dòng)上傳即可執(zhí)行
支持
支持
17
自動(dòng)化巡檢
比如您可以在crontd中編寫一條命令, 定時(shí)為您的多個(gè)服務(wù)器進(jìn)行巡檢操作,巡檢的結(jié)果,將會(huì)格式化的寫入本地日志,提
支持
不支持
18
不同文件上傳到不同服務(wù)器上
比如您部署Tomcat ?Weblogic集群的時(shí)候,有可能每一個(gè)Tomcat節(jié)點(diǎn)的配置文件都不同,那么可以采用此模式,進(jìn)行上傳配置文件
開發(fā)中
不支持
19
部署模式
比如您時(shí)常部署Tomcat程序 Weblogic程序等,部署的服務(wù)器需要部署完成一臺(tái)才能進(jìn)行下一臺(tái)的操作。很多企業(yè)都是這樣
支持
不支持
20
密碼方式登錄
密碼登陸,與Shell一樣
支持
支持
21
密鑰方式登錄
PublicKey登陸,與Shell一樣
支持
支持
實(shí)現(xiàn)架構(gòu):
安裝及使用
下載方式(您只需要選擇一種合適您的下載方式即可!):
第一種方式 如果您的Linux有g(shù)it命令,那么請使用以下這種方式下載:
#git clone https://github.com/zhangqichuan/CheungSSH.git
下載成功后,會(huì)在您的當(dāng)前目錄有一個(gè)CheungSSH的目錄,里面就是本軟件的所有程序了。
第二種方式 如果您的Linux上沒有g(shù)it命令,那么請使用以下方式進(jìn)行下載:
(1)在您的瀏覽器地址欄輸入: https://github.com/zhangqichuan/CheungSSH
(2)點(diǎn)擊Download ZIP就可以了,然后您可以unzip CheungSSH.zip 解壓即可!
#cd /home/tools/
#cd CheungSSH
#cd CheungSSH-master //通過瀏覽器下載
#chmod +x *
安裝方式:
第一種方式(自動(dòng)安裝方式)
#./install-CheungSSH.sh
Installing…
您的系統(tǒng)沒有python-devle包,現(xiàn)在需要安裝…
安裝python-devel成功!
/usr/bin/pip
Downloading/unpacking pycrypto
Downloading pycrypto-2.6.1.tar.gz (446kB): 446kB downloaded
Running 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 (the
Installing collected packages: pycrypto
Running setup.py install for pycrypto
checking for gcc… gcc
checking whether the C compiler works… yes
checking for C compiler default output file name… a.out
checking for suffix of executables…
checking whether we are cross compiling… no
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ISO C89… none needed
checking for __gmpz_init in -lgmp… no
checking for __gmpz_init in -lmpir… no
checking whether mpz_powm is declared… no
checking whether mpz_powm_sec is declared… no
checking how to run the C preprocessor… gcc -E
checking for grep that handles long lines and -e… /bin/grep
checking for egrep… /bin/grep -E
checking for ANSI C header files… yes
checking for sys/types.h… yes
checking for sys/stat.h… yes
checking for stdlib.h… yes
checking for string.h… yes
checking for memory.h… yes
checking for strings.h… yes
checking for inttypes.h… yes
checking for stdint.h… yes
checking for unistd.h… yes
checking for inttypes.h… (cached) yes
checking limits.h usability… yes
checking limits.h presence… yes
checking for limits.h… yes
checking stddef.h usability… yes
checking stddef.h presence… yes
checking for stddef.h… yes
checking for stdint.h… (cached) yes
checking for stdlib.h… (cached) yes
checking for string.h… (cached) yes
checking wchar.h usability… yes
checking wchar.h presence… yes
checking for wchar.h… yes
checking for inline… inline
checking for int16_t… yes
checking for int32_t… yes
checking for int64_t… yes
checking for int8_t… yes
checking for size_t… yes
checking for uint16_t… yes
checking for uint32_t… yes
checking for uint64_t… yes
checking for uint8_t… yes
checking for stdlib.h… (cached) yes
checking for GNU libc compatible malloc… yes
checking for memmove… yes
checking for memset… yes
configure: creating ./config.status
config.status: creating src/config.h
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
building ‘Crypto.Hash._MD2’ extension
gcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -std=c99 -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.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/MD2.c:31:
/usr/include/python2.6/pyconfig-64.h:1034:1: 警告:“_POSIX_C_SOURCE”重定義
在包含自 /usr/include/string.h:27 的文件中,
從 src/MD2.c:30:
/usr/include/features.h:162:1: 警告:這是先前定義的位置
在包含自 /usr/include/python2.6/pyconfig.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/MD2.c:31:
/usr/include/python2.6/pyconfig-64.h:1043:1: 警告:“_XOPEN_SOURCE”重定義
在包含自 /usr/include/string.h:27 的文件中,
從 src/MD2.c:30:
/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.so
building ‘Crypto.Hash._MD4’ extension
gcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -std=c99 -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.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/MD4.c:31:
/usr/include/python2.6/pyconfig-64.h:1034:1: 警告:“_POSIX_C_SOURCE”重定義
在包含自 /usr/include/string.h:27 的文件中,
從 src/MD4.c:30:
/usr/include/features.h:162:1: 警告:這是先前定義的位置
在包含自 /usr/include/python2.6/pyconfig.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/MD4.c:31:
/usr/include/python2.6/pyconfig-64.h:1043:1: 警告:“_XOPEN_SOURCE”重定義
在包含自 /usr/include/string.h:27 的文件中,
從 src/MD4.c:30:
/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.so
building ‘Crypto.Hash._SHA256’ extension
gcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -std=c99 -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.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/hash_SHA2_template.c:33,
從 src/SHA256.c:72:
/usr/include/python2.6/pyconfig-64.h:1034:1: 警告:“_POSIX_C_SOURCE”重定義
在包含自 /usr/include/stdint.h:26 的文件中,
從 src/hash_SHA2.h:72,
從 src/SHA256.c:35:
/usr/include/features.h:162:1: 警告:這是先前定義的位置
在包含自 /usr/include/python2.6/pyconfig.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/hash_SHA2_template.c:33,
從 src/SHA256.c:72:
/usr/include/python2.6/pyconfig-64.h:1043:1: 警告:“_XOPEN_SOURCE”重定義
在包含自 /usr/include/stdint.h:26 的文件中,
從 src/hash_SHA2.h:72,
從 src/SHA256.c:35:
/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.so
building ‘Crypto.Hash._SHA224’ extension
gcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -std=c99 -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.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/hash_SHA2_template.c:33,
從 src/SHA224.c:73:
/usr/include/python2.6/pyconfig-64.h:1034:1: 警告:“_POSIX_C_SOURCE”重定義
在包含自 /usr/include/stdint.h:26 的文件中,
從 src/hash_SHA2.h:72,
從 src/SHA224.c:36:
/usr/include/features.h:162:1: 警告:這是先前定義的位置
在包含自 /usr/include/python2.6/pyconfig.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/hash_SHA2_template.c:33,
從 src/SHA224.c:73:
/usr/include/python2.6/pyconfig-64.h:1043:1: 警告:“_XOPEN_SOURCE”重定義
在包含自 /usr/include/stdint.h:26 的文件中,
從 src/hash_SHA2.h:72,
從 src/SHA224.c:36:
/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.so
building ‘Crypto.Hash._SHA384’ extension
gcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -std=c99 -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.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/hash_SHA2_template.c:33,
從 src/SHA384.c:80:
/usr/include/python2.6/pyconfig-64.h:1034:1: 警告:“_POSIX_C_SOURCE”重定義
在包含自 /usr/include/stdint.h:26 的文件中,
從 src/hash_SHA2.h:72,
從 src/SHA384.c:36:
/usr/include/features.h:162:1: 警告:這是先前定義的位置
在包含自 /usr/include/python2.6/pyconfig.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/hash_SHA2_template.c:33,
從 src/SHA384.c:80:
/usr/include/python2.6/pyconfig-64.h:1043:1: 警告:“_XOPEN_SOURCE”重定義
在包含自 /usr/include/stdint.h:26 的文件中,
從 src/hash_SHA2.h:72,
從 src/SHA384.c:36:
/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.so
building ‘Crypto.Hash._SHA512’ extension
gcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -std=c99 -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.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/hash_SHA2_template.c:33,
從 src/SHA512.c:80:
/usr/include/python2.6/pyconfig-64.h:1034:1: 警告:“_POSIX_C_SOURCE”重定義
在包含自 /usr/include/stdint.h:26 的文件中,
從 src/hash_SHA2.h:72,
從 src/SHA512.c:36:
/usr/include/features.h:162:1: 警告:這是先前定義的位置
在包含自 /usr/include/python2.6/pyconfig.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/hash_SHA2_template.c:33,
從 src/SHA512.c:80:
/usr/include/python2.6/pyconfig-64.h:1043:1: 警告:“_XOPEN_SOURCE”重定義
在包含自 /usr/include/stdint.h:26 的文件中,
從 src/hash_SHA2.h:72,
從 src/SHA512.c:36:
/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.so
building ‘Crypto.Hash._RIPEMD160’ extension
gcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -std=c99 -O3 -fomit-frame-pointer -DPCT_LITTLE_ENDIAN=1 -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.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/RIPEMD160.c:57:
/usr/include/python2.6/pyconfig-64.h:1034:1: 警告:“_POSIX_C_SOURCE”重定義
在包含自 /usr/include/stdint.h:26 的文件中,
從 src/RIPEMD160.c:48:
/usr/include/features.h:162:1: 警告:這是先前定義的位置
在包含自 /usr/include/python2.6/pyconfig.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/RIPEMD160.c:57:
/usr/include/python2.6/pyconfig-64.h:1043:1: 警告:“_XOPEN_SOURCE”重定義
在包含自 /usr/include/stdint.h:26 的文件中,
從 src/RIPEMD160.c:48:
/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.so
building ‘Crypto.Cipher._AES’ extension
gcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -std=c99 -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.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/AES.c:29:
/usr/include/python2.6/pyconfig-64.h:1034:1: 警告:“_POSIX_C_SOURCE”重定義
在包含自 /usr/include/assert.h:37 的文件中,
從 src/AES.c:27:
/usr/include/features.h:162:1: 警告:這是先前定義的位置
在包含自 /usr/include/python2.6/pyconfig.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/AES.c:29:
/usr/include/python2.6/pyconfig-64.h:1043:1: 警告:“_XOPEN_SOURCE”重定義
在包含自 /usr/include/assert.h:37 的文件中,
從 src/AES.c:27:
/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.so
building ‘Crypto.Cipher._ARC2’ extension
gcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -std=c99 -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.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/ARC2.c:45:
/usr/include/python2.6/pyconfig-64.h:1034:1: 警告:“_POSIX_C_SOURCE”重定義
在包含自 /usr/include/string.h:27 的文件中,
從 src/ARC2.c:44:
/usr/include/features.h:162:1: 警告:這是先前定義的位置
在包含自 /usr/include/python2.6/pyconfig.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/ARC2.c:45:
/usr/include/python2.6/pyconfig-64.h:1043:1: 警告:“_XOPEN_SOURCE”重定義
在包含自 /usr/include/string.h:27 的文件中,
從 src/ARC2.c:44:
/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.so
building ‘Crypto.Cipher._Blowfish’ extension
gcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -std=c99 -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.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/Blowfish.c:39:
/usr/include/python2.6/pyconfig-64.h:1034:1: 警告:“_POSIX_C_SOURCE”重定義
在包含自 /usr/include/stdint.h:26 的文件中,
從 src/Blowfish.c:31:
/usr/include/features.h:162:1: 警告:這是先前定義的位置
在包含自 /usr/include/python2.6/pyconfig.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/Blowfish.c:39:
/usr/include/python2.6/pyconfig-64.h:1043:1: 警告:“_XOPEN_SOURCE”重定義
在包含自 /usr/include/stdint.h:26 的文件中,
從 src/Blowfish.c:31:
/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.so
building ‘Crypto.Cipher._CAST’ extension
gcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.6 -c src/CAST.c -o build/temp.linux-x86_64-2.6/src/CAST.o
gcc -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.so
building ‘Crypto.Cipher._DES’ extension
gcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -std=c99 -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.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/DES.c:37:
/usr/include/python2.6/pyconfig-64.h:1034:1: 警告:“_POSIX_C_SOURCE”重定義
在包含自 /usr/include/assert.h:37 的文件中,
從 src/libtom/tomcrypt.h:3,
從 src/libtom/tomcrypt_des.c:11,
從 src/DES.c:32:
/usr/include/features.h:162:1: 警告:這是先前定義的位置
在包含自 /usr/include/python2.6/pyconfig.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/DES.c:37:
/usr/include/python2.6/pyconfig-64.h:1043:1: 警告:“_XOPEN_SOURCE”重定義
在包含自 /usr/include/assert.h:37 的文件中,
從 src/libtom/tomcrypt.h:3,
從 src/libtom/tomcrypt_des.c:11,
從 src/DES.c:32:
/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.so
building ‘Crypto.Cipher._DES3’ extension
gcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -std=c99 -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.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/DES.c:37,
從 src/DES3.c:26:
/usr/include/python2.6/pyconfig-64.h:1034:1: 警告:“_POSIX_C_SOURCE”重定義
在包含自 /usr/include/assert.h:37 的文件中,
從 src/libtom/tomcrypt.h:3,
從 src/libtom/tomcrypt_des.c:11,
從 src/DES.c:32,
從 src/DES3.c:26:
/usr/include/features.h:162:1: 警告:這是先前定義的位置
在包含自 /usr/include/python2.6/pyconfig.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/DES.c:37,
從 src/DES3.c:26:
/usr/include/python2.6/pyconfig-64.h:1043:1: 警告:“_XOPEN_SOURCE”重定義
在包含自 /usr/include/assert.h:37 的文件中,
從 src/libtom/tomcrypt.h:3,
從 src/libtom/tomcrypt_des.c:11,
從 src/DES.c:32,
從 src/DES3.c:26:
/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.so
building ‘Crypto.Cipher._ARC4’ extension
gcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.6 -c src/ARC4.c -o build/temp.linux-x86_64-2.6/src/ARC4.o
gcc -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.so
building ‘Crypto.Cipher._XOR’ extension
gcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.6 -c src/XOR.c -o build/temp.linux-x86_64-2.6/src/XOR.o
gcc -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.so
building ‘Crypto.Util.strxor’ extension
gcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.6 -c src/strxor.c -o build/temp.linux-x86_64-2.6/src/strxor.o
gcc -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.so
building ‘Crypto.Util._counter’ extension
gcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -std=c99 -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.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/_counter.c:28:
/usr/include/python2.6/pyconfig-64.h:1034:1: 警告:“_POSIX_C_SOURCE”重定義
在包含自 /usr/include/assert.h:37 的文件中,
從 src/_counter.c:25:
/usr/include/features.h:162:1: 警告:這是先前定義的位置
在包含自 /usr/include/python2.6/pyconfig.h:6 的文件中,
從 /usr/include/python2.6/Python.h:8,
從 src/_counter.c:28:
/usr/include/python2.6/pyconfig-64.h:1043:1: 警告:“_XOPEN_SOURCE”重定義
在包含自 /usr/include/assert.h:37 的文件中,
從 src/_counter.c:25:
/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.so
Successfully installed pycrypto
Cleaning up…
安裝pycrypto成功
Downloading/unpacking paramiko
Downloading paramiko-1.15.2.tar.gz (1.2MB): 1.2MB downloaded
Running 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 FOR
Requirement already satisfied (use –upgrade to upgrade): pycrypto!=2.4,>=2.1 in /usr/lib64/python2.6/site-packages (from paramiko)
Downloading/unpacking ecdsa>=0.11 (from paramiko)
Downloading ecdsa-0.13.tar.gz (55kB): 55kB downloaded
Running 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, ecdsa
Running setup.py install for paramiko
Running setup.py install for ecdsa
got version from file /tmp/pip_build_root/ecdsa/ecdsa/_version.py {‘version’: ‘0.13’, ‘full’: ‘5a6fc047222cf21ad89f6cbf8782d0f1e3ddacda’}
UPDATING build/lib/ecdsa/_version.py
Successfully installed paramiko ecdsa
Cleaning up…
安裝paramiko成功
恭喜,您已經(jīng)安裝好了環(huán)境,接下來請您使用 ./cheungSSH_Manager_Stand_V92_ISSUE.py 啟動(dòng)程序
第二種方式(手動(dòng)安裝方式,在第一種方式失敗后,您可以使用這種方式安裝,如果第一種方式成功,那么就不需要使用這個(gè)方式安裝)
假如,您使用自動(dòng)的安裝方式 ./install-CheungSSH.sh 失敗了,那么請您使用如下方法手動(dòng)安裝哦!
#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 //先執(zhí)行一下,會(huì)生成一些初始化配置文件
CMD>>>>exit //然后退出,就算部署好了,接下來就可以修改配置文件,就能使用啦!!
#more /cheung/conf/cheung.conf //先看看配置文件
[CheungSSH]
#Author=Cheung Kei-Chuen
#QQ=741345015
Servers=localhost,127.0.0.1,www.baidu.com //這里是遠(yuǎn)程服務(wù)器的IP,也就是被管理的服務(wù)器
Username=YourServerCount //服務(wù)器對應(yīng)的賬戶名,也就是遠(yuǎn)程服務(wù)器上的賬戶名
Password=Yourcount-Password //服務(wù)器對應(yīng)的賬戶password,也就是遠(yuǎn)程服務(wù)器上的賬戶password
Useroot=N //是否使用su -root,我設(shè)計(jì)的是既可以su –root,也可以sudo,就是沒有設(shè)計(jì)成Ansible的sudo 還要加su ,我認(rèn)為那是繁瑣的。
//如果您是剛剛使用我的程序,您只需要配置以上就行了,以上是基本的配置, 以下是高級配置哦!
#localhost_User=apache //如果您的眾多服務(wù)器中,有些服務(wù)器的用戶名不盡相同,那么您可以在此處指定額外的用戶名,比如www.baidu.com_User=administrator;
#localhost_Password=apache-password //服務(wù)器對應(yīng)的賬戶password,也就是遠(yuǎn)程服務(wù)器上的賬戶password
#localhost_Port=222 //端口號
#如果您的每個(gè)服務(wù)器的賬戶對應(yīng)的密碼不是都一樣,那么您可以使用這個(gè)配置
#Passwordroot=root-password //如果使用了su – root,此處需要指定root的password
#Timeout=10 //指定登陸服務(wù)器的響應(yīng)超時(shí)時(shí)間
RunMode=M //使用多線程運(yùn)行程序
UseKey=n //是否使用密鑰登錄
Deployment=n //是否使用部署模式,比如在更新Tomcat,Apache 的時(shí)候,需要逐一進(jìn)行部署,使用該模式后,程序會(huì)結(jié)果您指定的日志信息進(jìn)行判斷重啟是否成功,如果成功,則自動(dòng)進(jìn)行下一個(gè)服務(wù)器的部署。否則會(huì)有提示
#ListenFile=/var/log/messages //使用了部署模式后,您需要制定一個(gè)日志文件, 讓程序去讀取您指定的關(guān)鍵信息
#ListenTime=60 //#使用了部署模式后,程序讀取您指定的日志信息時(shí)間,默認(rèn)為60秒鐘,如果在指定時(shí)間未讀取到相關(guān)信息,則認(rèn)為部署失敗
#ListenChar=Server startup //使用了部署模式后, 您指定的字符信息,如果讀取到這個(gè)信息,那么就認(rèn)為部署成功, 服務(wù)器將自動(dòng)進(jìn)行下一個(gè)部署,比如tomcat中如果出現(xiàn)這個(gè)字符,那么可以認(rèn)為是啟動(dòng)成功了的,當(dāng)然要排除啟動(dòng)后的一些404,500錯(cuò)誤。因?yàn)檫@里只判斷啟動(dòng)是否成功
Port=22 //遠(yuǎn)程服務(wù)器的端口,默認(rèn)是22
IP_Port //不同服務(wù)器的不同端口, 可以此處指定。
測試:
1、每個(gè)服務(wù)器的密碼都相同的情況下,適用于測試環(huán)境和開發(fā)環(huán)境代碼部署。配置文件如下:
#more /cheung/conf/cheung.conf
[CheungSSH]
#Author=Cheung Kei-Chuen
#QQ=741345015
Servers=192.168.1.3,192.168.1.4
Username=root
Password=123456
Useroot=N
#localhost_User=apache
#localhost_Password=apache-password
#localhost_Port=222
#如果您的每個(gè)服務(wù)器的賬戶對應(yīng)的密碼不是都一樣,那么您可以使用這個(gè)配置
#Passwordroot=root-password
#Timeout=10
RunMode=M
UseKey=n
Deployment=n
#ListenFile=/var/log/messages
#ListenTime=60
#ListenChar=Server startup
Port=22
#/cheungSSH_Manager_Stand_V94_ISSUE.py
Servers:2|RunMode:M|UseKey:n|Deployment:n
CMD>>>>mkdir /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)
CMD>>>>exit
到192.168.1.3和192.168.1.4上的home目下去查看是否有test目錄,經(jīng)過查看是存在的。
在執(zhí)行命令的時(shí)候要輸入完整的路徑。
2、不同賬戶密碼和不同端口號,適用于生產(chǎn)環(huán)境,配置如下:
#cat /cheung/conf/cheung.conf
[CheungSSH]
#Author=Cheung Kei-Chuen
#QQ=741345015
Servers=127.0.0.1
Username=root
Password=123456
Useroot=N
192.168.1.91_User=root
192.168.1.254_User=root
192.168.1.91_Password=xxxxxx
192.168.1.254_Password=xxxxxxxxxxxx
192.168.1.254_Port=13420
#如果您的每個(gè)服務(wù)器的賬戶對應(yīng)的密碼不是都一樣,那么您可以使用這個(gè)配置
#Passwordroot=root-password
#Timeout=10
RunMode=M
UseKey=n
Deployment=n
#ListenFile=/var/log/messages
#ListenTime=60
#ListenChar=Server startup
Port=22
#./cheungSSH_Manager_Stand_V94_ISSUE.py
Servers:3|RunMode:M|UseKey:n|Deployment:n
CMD>>>>df -h
++++++——————————————————————
|文件系統(tǒng) 容量 已用 可用 已用%% 掛載點(diǎn)
|/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)
————————————————————————
++++++———————————————————————-
|文件系統(tǒng) 容量 已用 可用 已用%% 掛載點(diǎn)
|/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)
—————————————————————————-
++++++———————————————————————
|文件系統(tǒng) 容量 已用 可用 已用% 掛載點(diǎn)
|/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)
遠(yuǎn)程執(zhí)行腳本:
在您本地的腳本,讓他在遠(yuǎn)程服務(wù)器上運(yùn)行,事先遠(yuǎn)程服務(wù)器上沒有這個(gè)腳本的哦!
應(yīng)用場景,比如您要對服務(wù)器執(zhí)行一個(gè)腳本內(nèi)容, 而事先無需讓這個(gè)腳本在遠(yuǎn)程服務(wù)器上存在,只需要 ? ? ? ?在本地程序上運(yùn)行,就能讓遠(yuǎn)程服務(wù)器上運(yùn)行了哦!
#cd /home/crontab/
#vim ip.sh
#!/bin/bash
echo “遠(yuǎn)端服務(wù)器:“
/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-f
Servers:3|RunMode:M|UseKey:n|Deployment:n
CMD>>>>/home/crontab/ip.sh
++++++——————————————————————
|遠(yuǎn)端服務(wù)器:
|192.168.1.2
|
|+OK 127.0.0.1 (0.56 Sec, All 3 Done 1Cmd:Sucess)
————————————————————————
++++++———————————————————————-
|遠(yuǎn)端服務(wù)器:
|192.168.1.254
|
|+OK 192.168.1.254 (0.57 Sec, All 3 Done 2Cmd:Sucess)
—————————————————————————-
++++++———————————————————————
|遠(yuǎn)端服務(wù)器:
|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系統(tǒng)命令,但是不包括交互式的命令, 例如top交互,vi交互)舉例:
CMD>>>>df -h|awk ‘$NF==”/”{print $(NF-1)}’ //檢查您的根 “/” 分區(qū)使用量
CMD>>>>top -b -d 1 -n 1 //查看服務(wù)器的top信息
CMD>>>>/etc/init.d/mysqld restart ? //重啟mysql服務(wù),執(zhí)行這個(gè)之后,所有服務(wù)器的mysql服務(wù)都會(huì)被重啟。
#echo -e ‘a(chǎn)wk -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/ //從多個(gè)服務(wù)器下載單個(gè)文件到執(zhí)行命令的服務(wù)器上。-s后面是要下載的文件,-d后面是存儲(chǔ)到本地的目錄,最后的文件會(huì)在文件名后面加上_服務(wù)器的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 //日志是按小時(shí)分割的,只要符合正則就行。
#./cheungSSH_Manager_Stand_V94_ISSUE.py -t upload -s /usr/local/nginx/nginx.conf -d /usr/local/nginx/nginx.conf //上傳單個(gè)文件到多臺(tái)服務(wù)器的上。
創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎(jiǎng)勵(lì)來咯,堅(jiān)持創(chuàng)作打卡瓜分現(xiàn)金大獎(jiǎng)總結(jié)
以上是生活随笔為你收集整理的cheungssh mysql密码_CheungSSH安装及基本使用的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: idea中svn的更新、检出、提交操作
- 下一篇: C语言中malloc函数产生的内存泄漏问