系统批量运维管理器paramiko详解
一、paramiko介绍
paramiko是基于Python实现的SSH2远程安全连接,支持认证及密钥方式。可以实现远程命令执行、文件传输、中间SSH代理等功能,相对于Pexpect,封装的层次更高,更贴近SSH协议的功能
官网地址:http://www.paramiko.org/installing.html
http://docs.paramiko.org/en/2.4/
https://pypi.org/project/paramiko/
二、paramiko安装
root@localhost ~]# pip3 install paramiko
简单实现远程SSH运行命令示例
import paramiko hostname = '192.168.56.132'
username = 'root'
password = ''
paramiko.util.log_to_file('syslogin.log') #发送paramiko日志到syslogin.log文件 ssh = paramiko.SSHClient() #创建一个SSH客户端client对象
ssh.load_system_host_keys() #获取客户端host_keys,默认~/.ssh/known_hosts,非默认路径需指定
ssh.connect(hostname=hostname,username=username,password=password) #创建SSH连接
stdin,stdout,stderr = ssh.exec_command('free -m') #调用远程执行命令方法exec_command()
print(stdout.read().decode('utf-8')) #打印命令执行结果,得到Python列表形式,可以使用stdout_readlines()
ssh.close() #关闭SSH连接
程序运行结果如下图所示:
[root@localhost p_paramiko]# cat syslogin.log
DEB [-::47.022] thr= paramiko.transport: starting thread (client mode): 0xf5b8d668
DEB [-::47.023] thr= paramiko.transport: Local version/idstring: SSH-2.0-paramiko_2.4.1
DEB [-::47.026] thr= paramiko.transport: Remote version/idstring: SSH-2.0-OpenSSH_5.
INF [-::47.026] thr= paramiko.transport: Connected (version 2.0, client OpenSSH_5.)
DEB [-::47.027] thr= paramiko.transport: kex algos:['diffie-hellman-group-exchange-sha256', 'diffie-hellman-group-exchange-sha1', 'diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1'] server key:['ssh-rsa', 'ssh-dss'] client encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', 'rijndael-cbc@lysator.liu.se'] server encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', 'rijndael-cbc@lysator.liu.se'] client mac:['hmac-md5', 'hmac-sha1', 'umac-64@openssh.com', 'hmac-sha2-256', 'hmac-sha2-512', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac-sha1-96', 'hmac-md5-96'] server mac:['hmac-md5', 'hmac-sha1', 'umac-64@openssh.com', 'hmac-sha2-256', 'hmac-sha2-512', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac-sha1-96', 'hmac-md5-96'] client compress:['none', 'zlib@openssh.com'] server compress:['none', 'zlib@openssh.com'] client lang:[''] server lang:[''] kex follows?False
DEB [-::47.028] thr= paramiko.transport: Kex agreed: diffie-hellman-group-exchange-sha256
DEB [-::47.028] thr= paramiko.transport: HostKey agreed: ssh-rsa
DEB [-::47.028] thr= paramiko.transport: Cipher agreed: aes128-ctr
DEB [-::47.028] thr= paramiko.transport: MAC agreed: hmac-sha2-
DEB [-::47.028] thr= paramiko.transport: Compression agreed: none
DEB [-::47.072] thr= paramiko.transport: Got server p ( bits)
DEB [-::47.139] thr= paramiko.transport: kex engine KexGexSHA256 specified hash_algo <built-in function openssl_sha256>
DEB [-::47.139] thr= paramiko.transport: Switch to new keys ...
DEB [-::47.182] thr= paramiko.transport: userauth is OK
INF [-::47.351] thr= paramiko.transport: Authentication (password) successful!
DEB [-::47.352] thr= paramiko.transport: [chan ] Max packet in: bytes
DEB [-::47.353] thr= paramiko.transport: [chan ] Max packet out: bytes
DEB [-::47.353] thr= paramiko.transport: Secsh channel opened.
DEB [-::47.354] thr= paramiko.transport: [chan ] Sesch channel request ok
DEB [-::47.360] thr= paramiko.transport: [chan ] EOF received ()
DEB [-::26.006] thr= paramiko.transport: starting thread (client mode): 0x5f2736d8
DEB [-::26.006] thr= paramiko.transport: Local version/idstring: SSH-2.0-paramiko_2.4.1
DEB [-::26.010] thr= paramiko.transport: Remote version/idstring: SSH-2.0-OpenSSH_5.
INF [-::26.010] thr= paramiko.transport: Connected (version 2.0, client OpenSSH_5.)
DEB [-::26.010] thr= paramiko.transport: kex algos:['diffie-hellman-group-exchange-sha256', 'diffie-hellman-group-exchange-sha1', 'diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1'] server key:['ssh-rsa', 'ssh-dss'] client encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', 'rijndael-cbc@lysator.liu.se'] server encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', 'rijndael-cbc@lysator.liu.se'] client mac:['hmac-md5', 'hmac-sha1', 'umac-64@openssh.com', 'hmac-sha2-256', 'hmac-sha2-512', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac-sha1-96', 'hmac-md5-96'] server mac:['hmac-md5', 'hmac-sha1', 'umac-64@openssh.com', 'hmac-sha2-256', 'hmac-sha2-512', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac-sha1-96', 'hmac-md5-96'] client compress:['none', 'zlib@openssh.com'] server compress:['none', 'zlib@openssh.com'] client lang:[''] server lang:[''] kex follows?False
DEB [-::26.010] thr= paramiko.transport: Kex agreed: diffie-hellman-group-exchange-sha256
DEB [-::26.010] thr= paramiko.transport: HostKey agreed: ssh-rsa
DEB [-::26.011] thr= paramiko.transport: Cipher agreed: aes128-ctr
DEB [-::26.011] thr= paramiko.transport: MAC agreed: hmac-sha2-
DEB [-::26.011] thr= paramiko.transport: Compression agreed: none
DEB [-::26.054] thr= paramiko.transport: Got server p ( bits)
DEB [-::26.119] thr= paramiko.transport: kex engine KexGexSHA256 specified hash_algo <built-in function openssl_sha256>
DEB [-::26.119] thr= paramiko.transport: Switch to new keys ...
DEB [-::26.162] thr= paramiko.transport: userauth is OK
INF [-::26.243] thr= paramiko.transport: Authentication (password) successful!
DEB [-::26.243] thr= paramiko.transport: [chan ] Max packet in: bytes
DEB [-::26.244] thr= paramiko.transport: [chan ] Max packet out: bytes
DEB [-::26.244] thr= paramiko.transport: Secsh channel opened.
DEB [-::26.245] thr= paramiko.transport: [chan ] Sesch channel request ok
DEB [-::26.250] thr= paramiko.transport: [chan ] EOF received ()
DEB [-::19.574] thr= paramiko.transport: starting thread (client mode): 0x4546a710
DEB [-::19.574] thr= paramiko.transport: Local version/idstring: SSH-2.0-paramiko_2.4.1
DEB [-::19.578] thr= paramiko.transport: Remote version/idstring: SSH-2.0-OpenSSH_5.
INF [-::19.578] thr= paramiko.transport: Connected (version 2.0, client OpenSSH_5.)
DEB [-::19.579] thr= paramiko.transport: kex algos:['diffie-hellman-group-exchange-sha256', 'diffie-hellman-group-exchange-sha1', 'diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1'] server key:['ssh-rsa', 'ssh-dss'] client encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', 'rijndael-cbc@lysator.liu.se'] server encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', 'rijndael-cbc@lysator.liu.se'] client mac:['hmac-md5', 'hmac-sha1', 'umac-64@openssh.com', 'hmac-sha2-256', 'hmac-sha2-512', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac-sha1-96', 'hmac-md5-96'] server mac:['hmac-md5', 'hmac-sha1', 'umac-64@openssh.com', 'hmac-sha2-256', 'hmac-sha2-512', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac-sha1-96', 'hmac-md5-96'] client compress:['none', 'zlib@openssh.com'] server compress:['none', 'zlib@openssh.com'] client lang:[''] server lang:[''] kex follows?False
DEB [-::19.579] thr= paramiko.transport: Kex agreed: diffie-hellman-group-exchange-sha256
DEB [-::19.579] thr= paramiko.transport: HostKey agreed: ssh-rsa
DEB [-::19.579] thr= paramiko.transport: Cipher agreed: aes128-ctr
DEB [-::19.579] thr= paramiko.transport: MAC agreed: hmac-sha2-
DEB [-::19.579] thr= paramiko.transport: Compression agreed: none
DEB [-::19.580] thr= paramiko.transport: Got server p ( bits)
DEB [-::19.639] thr= paramiko.transport: kex engine KexGexSHA256 specified hash_algo <built-in function openssl_sha256>
DEB [-::19.640] thr= paramiko.transport: Switch to new keys ...
DEB [-::19.682] thr= paramiko.transport: userauth is OK
INF [-::19.817] thr= paramiko.transport: Authentication (password) successful!
DEB [-::19.817] thr= paramiko.transport: [chan ] Max packet in: bytes
DEB [-::19.818] thr= paramiko.transport: [chan ] Max packet out: bytes
DEB [-::19.818] thr= paramiko.transport: Secsh channel opened.
DEB [-::19.820] thr= paramiko.transport: [chan ] Sesch channel request ok
DEB [-::19.824] thr= paramiko.transport: [chan ] EOF received ()
DEB [-::23.623] thr= paramiko.transport: starting thread (client mode): 0xd3c8710
DEB [-::23.624] thr= paramiko.transport: Local version/idstring: SSH-2.0-paramiko_2.4.1
DEB [-::23.627] thr= paramiko.transport: Remote version/idstring: SSH-2.0-OpenSSH_5.
INF [-::23.627] thr= paramiko.transport: Connected (version 2.0, client OpenSSH_5.)
DEB [-::23.627] thr= paramiko.transport: kex algos:['diffie-hellman-group-exchange-sha256', 'diffie-hellman-group-exchange-sha1', 'diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1'] server key:['ssh-rsa', 'ssh-dss'] client encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', 'rijndael-cbc@lysator.liu.se'] server encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', 'rijndael-cbc@lysator.liu.se'] client mac:['hmac-md5', 'hmac-sha1', 'umacimport paramiko
-@openssh.com', 'hmac-sha2-', 'hmac-sha2-', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac-sha1-', 'hmac-md5-'] server mac:['hmac-md5', 'hmac-sha1', 'umac-@openssh.com', 'hmac-sha2-', 'hmac-sha2-', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac-sha1-', 'hmac-md5-'] client compress:['none', 'zlib@openssh.com'] server compress:['none', 'zlib@openssh.com'] client lang:[''] server lang:[''] kex follows?False
DEB [-::23.627] thr= paramiko.transport: Kex agreed: diffie-hellman-group-exchange-sha256
DEB [-::23.627] thr= paramiko.transport: HostKey agreed: ssh-rsa
DEB [-::23.627] thr= paramiko.transport: Cipher agreed: aes128-ctr
DEB [-::23.628] thr= paramiko.transport: MAC agreed: hmac-sha2-
DEB [-::23.628] thr= paramiko.transport: Compression agreed: none
DEB [-::23.672] thr= paramiko.transport: Got server p ( bits)
DEB [-::23.741] thr= paramiko.transport: kex engine KexGexSHA256 specified hash_algo <built-in function openssl_sha256>
DEB [-::23.741] thr= paramiko.transport: Switch to new keys ...
DEB [-::23.782] thr= paramiko.transport: userauth is OK
INF [-::23.861] thr= paramiko.transport: Authentication (password) successful!
DEB [-::23.862] thr= paramiko.transport: [chan ] Max packet in: bytes
DEB [-::23.863] thr= paramiko.transport: [chan ] Max packet out: bytes
DEB [-::23.863] thr= paramiko.transport: Secsh channel opened.
DEB [-::23.864] thr= paramiko.transport: [chan ] Sesch channel request ok
DEB [-::23.868] thr= paramiko.transport: [chan ] EOF received ()
syslogin.log信息
三、paramiko的核心组件
paramiko包含两个核心组件,一个为SSHClient类,另一个为SFTPClient类。
SSHClient类
SSHClient类是SSH服务会话的高级表示,该类封装了传输(transport)、通道(channel)及SFTPClient的校验、建立的方法,通常用于执行远程命令。
client = SSHClient()
client.load_system_host_keys()
client.connect('ssh.example.com')
stdin, stdout,stderr = client.exec_command('ls -l')
SSHClient常用的方法介绍
官方文档:http://docs.paramiko.org/en/2.4/api/client.html?highlight=connect
connect方法
conect方法实现了远程SSH连接并校验
方法定义:
connect(hostname, port=, username=None, password=None, pkey=None, key_filename=None, timeout=None, allow_agent=True, look_for_keys=True, compress=False, sock=None, gss_auth=False, gss_kex=False, gss_deleg_creds=True, gss_host=None, banner_timeout=None, auth_timeout=None, gss_trust_dns=True, passphrase=None)
参数说明:
- hostname(str类型),连接的目标主机地址;
- port(int类型),连接目标主机的端口,默认为22;
- username(str类型),校验的用户名(默认为当前的本地用户名);
- password(str类型),密码用于身份校验或解锁私钥;
- pkey(Pkey类型),私钥方式用于身份验证;
- key_filename(str or list(str)类型),一个文件名或文件名列表,用于私钥的身份验证;
- timeout(float类型),一个可选的超时时间(以秒为单位)的TCP连接;
- allow_agent(bool类型),设置为False时用于禁用连接到SSH代理;
- look_for_keys(bool类型),设置为False时用于来禁用在~/.ssh中搜索私钥文件;
- compress(bool类型),设置为True时打开压缩。
exec_command方法
远程命令执行方法,该命令的输入与输出流为标准输入(stdin)、输出(stdout)、错误(stderr)的Python文件对像。
方法定义:
exec_command(command, bufsize=-, timeout=None, get_pty=False, environment=None)
参数说明:
- command(str类型),执行的命令串;
- bufsize(int类型),文件缓冲区大小,默认为-1(不限制)
load_system_host_keys方法
加载本地公钥校验文件,默认为~/.ssh/known_host,非默认路径需要手工指定。
方法定义:
load_system_host_keys(self,filename=None)
参数说明:
filename(str类型),指定远程主机公钥记录文件。
set_missing_host_policy方法
设置连接的远程主机没有主机密钥或HostKeys对象时的策略,目前支持三种,分别是AutoAddPolicy、RejectPolicy(默认)、WarningPolicy,仅限用于SSHClient类。
- AutoAddPolicy,目标添加主机名及主机密钥到本地HostKeys对象,并将其保存,不依赖load_system_host_keys()的配置,即使~/.ssh/hnown_hosts不存在也不产生影响;
- RejectPolicy,自动拒绝未知的主机名和密钥,依赖load_system_host_keys()的配置;
- WarningPolicy,用于记录一个未知的主机密钥的Python警告,并接收它,功能上AutoAddPolicy相似,但未知主机会有告警。
使用方法如下:
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
SFTPClient类
SFTPClient作为一个SFTP客户端对象,根据SSH传输协议的sftp会话,实现远程文件操作,比如文件上传、下载、权限、状态等操作。
SFTPClient类常用方法
官方文档:http://docs.paramiko.org/en/2.4/api/sftp.html
from_transport方法
创建一个已连通的SFTP客户端通道。
方法定义:
from_transport(cls,t)
参数说明:
t(transport),一个已通过验证的传输对象。
示例说明:
import paramiko t = paramiko.Transport(('192.168.56.132',))
t.connect(username='root',password='')
sftp = paramiko.SFTPClient.from_transport(t)
put方法
上传本地文件到远程SFTP服务端
方法定义:
put(localpath, remotepath, callback=None, confirm=True)
参数说明:
- localpath(str类型),需上传的本地文件(源);
- remotepath(str类型),远程路径(目标);
- callback(funcation(int,int)),获取已接收的字节数及总传输字节数,以便回调函数调用,默认为None;
- confirm(bool类型),文件上传完毕后是否调用stat()方法,以便确认文件的大小。
示例说明:
localpath='/home/access.log'
remotepath='/data/logs/access.log'
sftp.put(localpath,remotepath)
get方法
从远程SFTP服务端下载文件到本地。
方法定义:
get(remotepath, localpath, callback=None)
参数说明:
- remotepath(str类型),需要下载的远程文件(源);
- callback(funcation(int,int)),获取已接收的字节数及总和传输字节数,以便回调函数调用,默认为None.
示例说明:
remotepath = '/data/logs/access.log'
localpath = '/home/access.log'
sftp.get(remotepath,localpath)
其它方法
SFTPClient类其它常用方法说明:
- mkdir,在SFTP服务端创建目录,如sftp.mkdir("/home/userdir",mode=0777),默认模式是0777(八进制),在某些系统上,mode被忽略。在使用它的地方,当前的umask值首先被屏蔽掉。
- remove,删除SFTP服务端指定目录,如sftp.remove("/home/userdir")。
- rename,重命名SFTP服务端文件或目录,如sftp.rename("/home/test.sh","/home/testfile.sh")
- stat,获取远程SFTP服务端指定文件信息,如sftp.stat("/home/testfile.sh")。
- listdir,获取远程SFTP服务端指定目录列表,以Python的列表(List)形式返回,如sftp.listdir("/home")。
SFTPClient类应用示例
下面为SFTPClient类的一个完整示例,实现了文件上传、下载、创建与删除目录等,需要注意的是,put和get方法需要指定文件名,不能省略。
系统批量运维管理器paramiko详解的更多相关文章
- 系统批量运维管理器Fabric详解
系统批量运维管理器Fabric详解 Fabrici 是基于python现实的SSH命令行工具,简化了SSH的应用程序部署及系统管理任务,它提供了系统基础的操作组件,可以实现本地或远程shell命令,包 ...
- 系统批量运维管理器pexpect详解
一.pexpect介绍 pexpect可以理解成Linux下的expect的Python封装,通过pexpect我们可以实现对ssh.ftp.passwd.telnet等命令进行自动交互,而无需人工干 ...
- 系统批量运维管理器pexpect的使用
# pip install pexpect 或 # easy_install pexpect 1 #!/usr/bin/env python 2 import pexpect 3 child = pe ...
- GridBagLayout布局管理器应用详解
http://www.cnblogs.com/kungfupanda/p/7220217.html GridBagLayout布局管理器应用详解 很多情况下,我们已经不需要通过编写代码来实现一个应用程 ...
- 4.python 系统批量运维管理器之paramiko模块
paramiko paramiko是ssh服务最经常使用的模块,遵循SSH2协议,支持以加密和认证的方式,进行远程服务器的连接. paramiko实现ssh2不外乎两个角度:SSH客户端与服务端 SS ...
- PHPFastCGI进程管理器PHP-FPM详解
PHP-FPM是一个PHPFastCGI进程管理器,是只用于PHP的. PHP-FPM其实是PHP源代码的一个补丁,旨在将FastCGI进程管理整合进PHP包中.必须将它patch到你的PH ...
- JAVA中GridBagLayout布局管理器应用详解
很多情况下,我们已经不需要通过编写代码来实现一个应用程序的图形界面,而是通过强大的IDE工具通过拖拽辅以简单的事件处理代码即可很轻松的完成.但是我们不得不面对这样操作存在的一些问题,有时候我们希望能够 ...
- 运维监控---企业级Zabbix详解_【all】
基础LNMP环境搭建 Linux 下LNMP环境搭建 下载Zabbix 链接:https://pan.baidu.com/s/1n36esVyYAKstwnFopbV2sg 密码:izll 创建zab ...
- Python3自动化运维之Fabric模版详解
一.概要 Fabric是基于Python(2.7,3.4+以上版本)实现的SSH命令行工具,简化了SSH的应用程序部署及系统管理任务,它提供了系统基础的操作组件,可以实现本地或远程shell命令,包括 ...
随机推荐
- 项目中一个Jenkins权限配置的过程
需求:需要不同账号登录,只看到自己需要看到的job,比如: test01账号登录看到tes01t_job test02账号登录,只看到test02_job 分析:目的是不同项目,不希望看到其他项目或者 ...
- linux 下mongodb 3.2.5单机版安装
mongodb3.0.x的安装教程网上很多,这里主要介绍3.2.5的安装 linux iso 在\\10.10.10.1\ShareDoc\User\yipengzhi\ISO\Centos7.0 ...
- Python程序,辅助微信跳一跳游戏介绍
一.思路介绍 1. 通过Python自动手机截屏,并保存到电脑 2. 通过PhotoShop测量要跳的距离 3. 通过Excel计算按压时间 4. 通过CMD命令控制手机按压时间 二.实现方法详解 1 ...
- ffmpeg 从内存中读取数据(或将数据输出到内存)(转)
更新记录(2014.7.24): 1.为了使本文更通俗易懂,更新了部分内容,将例子改为从内存中打开. 2.增加了将数据输出到内存的方法. 从内存中读取数据 ffmpeg一般情况下支持打开一个本地文件, ...
- 堆排序算法-python实现
#-*- coding: UTF-8 -*- import numpy as np def MakeHeap(a): for i in xrange(a.size / 2 - 1, -1, -1):# ...
- 【python】使用HTMLParser、cookielib抓取和解析网页、从HTML文档中提取链接、图像、文本、Cookies
一.从HTML文档中提取链接 模块HTMLParser,该模块使我们能够根据HTML文档中的标签来简洁.高效地解析HTML文档. 处理HTML文档的时候,我们常常需要从其中提取出所有的链接.使用HTM ...
- emacs之配置auto-complete
el-get-install安装auto-complete emacsConfig/auto-complete-setting.el ;这个是设置一个字母就自动完成的 (setq ac-auto-st ...
- Call to your teacher
链接:https://www.nowcoder.net/acm/contest/76/F来源:牛客网 Call to your teacher 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/ ...
- Java-Runoob-高级教程-实例-环境设置实例:4.Java 实例 – 如何查看当前 Java 运行的版本?
ylbtech-Java-Runoob-高级教程-实例-环境设置实例:4.Java 实例 – 如何查看当前 Java 运行的版本? 1.返回顶部 1. Java 实例 - 如何查看当前 Java 运行 ...
- mysql5.7.12/13在安装新实例时报错:InnoDB: auto-extending data file ./ibdata1 is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero
.bin/mysqld --initialize-insecure --basedir=xxx --datadir=xxx 然后 .bin/mysqld_safe --defaults-file=xx ...