cheungssh mysql密码_CheungSSH安装及基本使用
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
命令結果返回狀態判斷
每個命令執行是否成功,成功了多少, 用時多少,都會顯示
支持
支持
9
su 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.sh
Installing…
您的系統沒有python-devle包,現在需要安裝…
安裝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成功
恭喜,您已經安裝好了環境,接下來請您使用 ./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 //先執行一下,會生成一些初始化配置文件
CMD>>>>exit //然后退出,就算部署好了,接下來就可以修改配置文件,就能使用啦!!
#more /cheung/conf/cheung.conf //先看看配置文件
[CheungSSH]
#Author=Cheung Kei-Chuen
#QQ=741345015
Servers=localhost,127.0.0.1,www.baidu.com //這里是遠程服務器的IP,也就是被管理的服務器
Username=YourServerCount //服務器對應的賬戶名,也就是遠程服務器上的賬戶名
Password=Yourcount-Password //服務器對應的賬戶password,也就是遠程服務器上的賬戶password
Useroot=N //是否使用su -root,我設計的是既可以su –root,也可以sudo,就是沒有設計成Ansible的sudo 還要加su ,我認為那是繁瑣的。
//如果您是剛剛使用我的程序,您只需要配置以上就行了,以上是基本的配置, 以下是高級配置哦!
#localhost_User=apache //如果您的眾多服務器中,有些服務器的用戶名不盡相同,那么您可以在此處指定額外的用戶名,比如www.baidu.com_User=administrator;
#localhost_Password=apache-password //服務器對應的賬戶password,也就是遠程服務器上的賬戶password
#localhost_Port=222 //端口號
#如果您的每個服務器的賬戶對應的密碼不是都一樣,那么您可以使用這個配置
#Passwordroot=root-password //如果使用了su – root,此處需要指定root的password
#Timeout=10 //指定登陸服務器的響應超時時間
RunMode=M //使用多線程運行程序
UseKey=n //是否使用密鑰登錄
Deployment=n //是否使用部署模式,比如在更新Tomcat,Apache 的時候,需要逐一進行部署,使用該模式后,程序會結果您指定的日志信息進行判斷重啟是否成功,如果成功,則自動進行下一個服務器的部署。否則會有提示
#ListenFile=/var/log/messages //使用了部署模式后,您需要制定一個日志文件, 讓程序去讀取您指定的關鍵信息
#ListenTime=60 //#使用了部署模式后,程序讀取您指定的日志信息時間,默認為60秒鐘,如果在指定時間未讀取到相關信息,則認為部署失敗
#ListenChar=Server startup //使用了部署模式后, 您指定的字符信息,如果讀取到這個信息,那么就認為部署成功, 服務器將自動進行下一個部署,比如tomcat中如果出現這個字符,那么可以認為是啟動成功了的,當然要排除啟動后的一些404,500錯誤。因為這里只判斷啟動是否成功
Port=22 //遠程服務器的端口,默認是22
IP_Port //不同服務器的不同端口, 可以此處指定。
測試:
1、每個服務器的密碼都相同的情況下,適用于測試環境和開發環境代碼部署。配置文件如下:
#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
#如果您的每個服務器的賬戶對應的密碼不是都一樣,那么您可以使用這個配置
#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目錄,經過查看是存在的。
在執行命令的時候要輸入完整的路徑。
2、不同賬戶密碼和不同端口號,適用于生產環境,配置如下:
#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
#如果您的每個服務器的賬戶對應的密碼不是都一樣,那么您可以使用這個配置
#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
++++++——————————————————————
|文件系統 容量 已用 可用 已用%% 掛載點
|/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/bash
echo “遠端服務器:“
/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
++++++——————————————————————
|遠端服務器:
|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交互)舉例:
CMD>>>>df -h|awk ‘$NF==”/”{print $(NF-1)}’ //檢查您的根 “/” 分區使用量
CMD>>>>top -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 //上傳單個文件到多臺服務器的上。
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的cheungssh mysql密码_CheungSSH安装及基本使用的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: idea中svn的更新、检出、提交操作
- 下一篇: C语言中malloc函数产生的内存泄漏问