|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的好朋友们!存眷项目主页以获得最新版本:
http://git.oschina.net/leedays/EasyXMS
有甚么优势?
- 简略易用
- 轻量级,只须要一个剧本文件,不须要装置Client端
- 装置安排快,一键装置所需的情况
2、重要功效
- 批量履行敕令批量上传文件记载每次输出的敕令到文件记载每次履行敕令的成果到文件
复制代码
3、情况装置
1.Python2.7
下载地址:http://www.python.org
2.easy_install对象(是Python装置模块的一个对象,像yum,可以主动处理依附)
下载地址:http://peak.telecommunity.com/dist/ez_setup.py
3.PyCrypto2.1+模块(PyCrypto是应用Python编写的加密对象包)
下载地址:https://www.dlitz.net/software/pycrypto/
4.paramiko模块(是用Python编写的支撑SSH协定的模块)
应用easy_install停止装置
详细的装置进程,参看上一篇文章:
http://linux5588.blog.51cto.com/65280/1275180
想省事?可下载博客附件的一键装置剧本,来装置paramiko模块须要的情况
请应用<source剧本名>的方法履行剧本
四.运转过程当中发生的文件
在剧本的履行过程当中,默许是会在以后目次下生成以下文件
1.server.conf
该文件是用于存储各个办事器的衔接信息如IP地址:端口:用户名:暗码,存储的信息是经由简略的加密,固然应用的可逆的加密算法,以下所示每行代表一个IP信息:
1
2
MTkyLjE2OC4xMDAuMjAxOjIyOnJvb3Q6MTIzNDU2
MTkyLjE2OC4xMDAuMjAyOjIyOnJvb3Q6MTIzNDU2
2.paramiko.log
该文件是paramiko模块在运转过程当中发生的日记文件
3.command_history.log
该文件是记载履行过的敕令
4.command_result_history.log
该文件是记载履行过的敕令的成果
5、怎样履行剧本?
1.应用python剧本名方法来履行
1
pythonEasyXMS.py
2.应用剧本的相对路径来履行,留意加上可履行权限
1
./EasyXMS.py
假如涌现以下情形,应用dos2unix转换一下便可
假如没有dos2unix,那末在Windows上应用像EmEditor这类的文本编纂器(不要应用Windows自带的记事本),把换行符修正为仅Unix,便可
6、操作演示
点击这里看静态演示
1.主菜单
输出?便可取得主菜单赞助
功效描写:
1
2
3
4
5
6
7
8
0增长办事器的IP信息到设置装备摆设文件(server.conf以下都指的是该设置装备摆设文件)
1加载一个包括多个办事器IP信息的文件,用于批量添加办事器到
2列出以后设置装备摆设文件中存在的办事器
3从设置装备摆设文件中删除指定的办事器信息
4清空设置装备摆设文件
5批量履行敕令
6批量上传文件
7清屏
2.选项0增长办事器的IP信息到设置装备摆设文件
3.选项1加载一个包括多个办事器IP信息的文件
预备一个文本文件,外面的包括这些内容IP地址:端口(22端口可以不写):用户名:暗码每行一个例如:
192.168.100.204:root:123456
192.168.100.205:root:123
192.168.100.206:root:123
4.选项2列出以后设置装备摆设文件中存在的办事器
5.选项3从设置装备摆设文件中删除指定的办事器信息
6.选项4清空设置装备摆设文件
7.选项5批量履行敕令
8.选项6批量上传文件
9.选项7清屏
7、留意事项
1.不克不及应用vi或许vim编纂长途文件
2.今朝不支撑tab键补全敕令
3.在按Backspace键涌现以下情形时
可用以下方法来处理:
假如你应用的SecureCRT,可以如许处理
假如应用的是Xshell,可以如许处理:
putty应用上去没这个成绩,然则假如有这个成绩,找到相似设置的处所设置一下便可
八.剧本内容
- #!/usr/bin/envpython#coding=utf-8#---------------------------------------------------------------------#Name:EasyXMS#Purpose:MultithreadingBatchExecutionCommandsandUploadFiles#Version:1.0#Author:LEO#BLOG:http://linux5588.blog.51cto.com#EMAIL:chanyipiaomiao@163.com#Created:2013-7-29#Copyright:(c)LEO2013#---------------------------------------------------------------------frombase64importencodestring,decodestringfromos.pathimportbasename,exists,isfilefromsysimportexit,platformfromtimeimportstrftimefromQueueimportQueuefromosimportsystemimportthreadingimportparamiko#掌握输入类classPrintHelp(object):def__init__(self):"""界说敕令列表"""self.cmd_list=[AddServer,LoadFile,ListServers,DeleteServer,EmptyFile,ExecuteCommand,UploadFile,ClearScreen,]self.name=EasyXMSself.example=***Example***:self.example_ip=%s192.168.1.1:22:root:123456192.168.1.3:test:123456%self.exampleself.example_delete=%s192.168.1.1192.168.1.2%self.exampleself.example_filepath=%s:/tmp/1.txt/tmp%self.exampledefprintPrompt(self):"""剧本运转提醒符"""return"%s(?Help)>>>"%self.namedefloopPrintCmd(self):"""轮回打印敕令列表"""printprint"PleaseChooseANumber:"printfori,vinenumerate(self.cmd_list):print"%5s%-5s"%(i,v)printdefprintHead(self):"""输入头部提醒信息"""print_string=WelcometoUse<%s>,PleaseInput<?>GetHelpOrDirect<Enter>Exit%self.namestring_temp="-"*len(print_string)printstring_tempprintprintprint_stringprintprintstring_tempprintdefwantQuit(self):"""加入提醒"""return"WantQuit?(y/n)[y|Enter]:"defprintInputWrong(self):"""提醒敕令输出有误"""printprint"WrongInput,Enter<?>GetHelpOrEnterExit!"printdefprintFileError(self,e):"""提醒读取主机设置装备摆设文件失足"""print"Oops!ReadFileOccurWrong:%s"%edefprintFileNotExistOrEmpty(self):"""提醒主机设置装备摆设文件不存在或许为空,请创立或许添加IP地址到文件"""printprint"TheFile[%s]NotExistOrEmpty,""Enter<0/1>toCreateOrAddServerIP."%configfileprintdefprintInvalidIP(self,info):"""提醒有效的信息"""print"InvalidFormat[%s]!!!"%infoprintdefprintIPFormat(self):"""添加办事器IP地址的格局"""printprintself.example_ipdefprintDeleteIPFormat(self):"""删除办事器IP时的格局"""printprintself.example_deleteprintdefprintInputIP(self):"""提醒输出IP地址以空格离开"""return"EnterServerInfo:"defprintInputIPForDelete(self):"""提醒输出办事器的IP地址"""return"EnterServerIP(OnlyIPAddress):"defprintAddIPSuccessful(self,ip):"""提醒增长办事器IP到设置装备摆设文件胜利"""print"AddServer[%s]to[%s]Successful!!!"%(ip,configfile)printdefprintRemoveIPSuccessful(self,ip):"""提醒从设置装备摆设文件中删除IP地址胜利"""print"Remove[%s]From[%s]Successful!!!"%(ip,configfile)printdefprintIPNotInFile(self,ip):"""输入IP地址不在设置装备摆设文件中"""print"%sisNotin[%s]"%(ip,configfile)printdefprintIPAlreadyInFile(self,ip):"""输入IP地址曾经在设置装备摆设文件中"""print"IP[%s]Alreadyin[%s]!!!"%(ip,configfile)printdefyouSureEmptyFile(self):"""提醒用户能否确认清空文件"""return"AreYouSureEmpty[%s](y/n):"%configfiledefemptySuccessful(self):"""输入清空文件胜利"""print"EmptyConfigFile[%s]Successful!!!"%configfileprintdefemptyFileFailure(self,e):"""输入清空文件掉败"""print"EmpytFile%sFailure!!!(%s)"%(configfile,e)defenterCommand(self):"""提醒输出敕令"""return"EnterCommand(q|QQuit):"defenterFilePath(self):"""提醒输出文件的路径"""return"Enter[Local]PathAnd<Remote>Path:"defenterFilePath2(self):"""加载文件时,提醒输出文件路径"""return"EnterFilePath(FileIncludeip:username:password):"definvaildCommand(self):"""输入有效的敕令"""print"InvaildCommand!!!"printdefinvaildFilePath(self,filepath):"""有效的文件路径"""print"InvaildFilePath%s!!!"%filepathprintdefprintSSHBePatient(self):"""输入正在初始化SSH衔接,请耐烦期待"""print"Initializing<SSH>Connections,PleaseBePatient..."printdefprintSFTPBePatient(self):"""输入正在初始化SFTP衔接,请耐烦期待"""print"Initializing<SFTP>Connections,PleaseBePatient..."printdefprintCommandResult(self,ip,cmd,out,error):"""输入敕令履行的成果"""result="========[%s]ExecuteCommand:%s,TheResultis:
- %s%s"%(ip,cmd,out,error)printresultreturnresultdefprintCanNotConnectIP(self,ip):"""输入不克不及衔接到该IP地址"""print"[Error]...CantConnectThisIP%s,PleaseCheck!!!"%ipprintdefuploadFileOK(self,src,ip):"""上传文件胜利"""print"UploadFile<%s>to%s...OK"%(src,ip)printdefuploadFileError(self,src,ip,e):"""上传文件涌现毛病"""print"UploadFile<%s>to%s...Error:%s"%(src,ip,e)printdefprintFilePath(self):"""输入上传文件时路径的例子"""printprintself.example_filepathdefprintArgsNotenough(self):"""输入参数不敷提醒"""print"ArgumentsNotEnough!!!"printdefgetDateTime(self):"""获得日期和时光"""returnstrftime(%Y-%m-%d%H:%M:%S)defreturnDateString(self):"""前往一个日期加星号的字符串用于标识敕令履行的成果"""return
- **********%s**********
- %self.getDateTime()defprintCannotCreateFile(self,filename,error):"""提醒没法创立文件"""printprint"CantCreate<%s>!!!:%s"%(filename,error)print#掌握输出类classInputValue(object):def__init__(self):self.inputValue=NonedefsetInputvalue(self):"""提醒输出敕令"""self.inputValue=raw_input(printhelp_obj.printPrompt())returnself.inputValuedefcloseConnections(self):"""封闭衔接函数"""ssh_connect_pool_dict=connectSSH_obj.getConnectionPool()sftp_connect_pool_dict=connectSFTP_obj.getConnectionPool()ifssh_connect_pool_dict:foriinssh_connect_pool_dict:ssh_connect_pool_dict[i].close()ifsftp_connect_pool_dict:forjinsftp_connect_pool_dict:sftp_connect_pool_dict[j].close()defexitFunction(self):"""加入本法式"""try:printquitp=raw_input(printhelp_obj.wantQuit())printexceptEOFError:self.closeConnections()printprintexit(0)ifnotquitporquitp==yorquitp==Y:self.closeConnections()exit(0)else:self.loopGetValue()defloopGetValue(self):"""轮回获得用户的输出,并断定"""try:whileself.setInputvalue():ifself.inputValue==?:printhelp_obj.loopPrintCmd()elifself.inputValue==0:readwriteconfigFile_obj.writeIPToFile()elifself.inputValue==1:readwriteconfigFile_obj.loadFile()elifself.inputValue==2:readwriteconfigFile_obj.readIPFromFile()elifself.inputValue==3:readwriteconfigFile_obj.deleteIPFromFile()elifself.inputValue==4:readwriteconfigFile_obj.emptyConfigFile()elifself.inputValue==5:startExecAction_obj.startExecCommand()elifself.inputValue==6:startExecAction_obj.startSFTP()elifself.inputValue==7:startExecAction_obj.clearScreen()else:printhelp_obj.printInputWrong()else:self.exitFunction()exceptEOFError:printself.exitFunction()exceptKeyboardInterrupt:printself.exitFunction()#操作设置装备摆设文件类classReadWriteConfigFile(object):defreadIPAsDict(self):"""读取一切的IP地址为一个字典像如许:{192.168.1.1:{port:22,user:root,pwd:123456},}"""ip_dict={}try:data=open(configfile,r)config_file=data.readlines()ifconfig_file:foriinconfig_file:i=decodestring(i)tempstring=i.split(:)ip=tempstring[0]ifipnotinip_dict:ip_dict[ip]={port:int(tempstring[1]),user:tempstring[2],pwd:tempstring[3]}except:pass#假如文件句柄被翻开过,则封闭try:data.close()except:passreturnip_dictdefreadIPFromFile(self):"""前往一个IP地址列表"""ip_list=self.readIPAsDict().keys()ifip_list:printforiinip_list:printiprintelse:printhelp_obj.printFileNotExistOrEmpty()deffileAppendObject(self,filename):"""以追加方法翻开文件并前往对象"""data=Noneerror=Nonetry:data=open(filename,a)exceptIOError,e:error=ereturndata,errordefwriteFile(self,data,server_list):"""写文件函数,用于写办事器的设置装备摆设信息"""ip_list=self.readIPAsDict().keys()forip_infoinserver_list:ip,info=self.checkIPInfo(ip_info)ifipandinfo:ifipnotinip_list:data.write(encodestring(info))printhelp_obj.printAddIPSuccessful(ip)else:printhelp_obj.printIPAlreadyInFile(ip)defloadFile(self):"""加载一个包括IP地址:端口:用户名:暗码的文件批量停止添加"""data2,error=self.fileAppendObject(configfile)ifdata2:printfilename=raw_input(printhelp_obj.enterFilePath2())printiffilename:try:data=open(filename,r)file_ip_list=data.readlines()data.close()self.writeFile(data2,file_ip_list)exceptIOError,e:printhelp_obj.printFileError(e)printdata2.close()else:printhelp_obj.printArgsNotenough()else:printhelp_obj.printCannotCreateFile(configfile,error)defcheckIPInfo(self,ipinfo):"""简略的检讨输出的IP等信息格局能否准确"""ip,info=None,Nonemaohao_num=ipinfo.count(:)ifmaohao_numin(2,3):ifipinfo.count(.)==3:info_list=ipinfo.split(:)ifmaohao_num==3:ip,port,user,passwd=info_listifmaohao_num==2:ip,user,passwd=info_listport=22ifpasswd:info=%s:%s:%s:%s%(ip,port,user,passwd)else:printhelp_obj.printInvalidIP(ipinfo)else:printhelp_obj.printInvalidIP(ipinfo)else:printhelp_obj.printInvalidIP(ipinfo)returnip,infodefwriteIPToFile(self):"""写入IP地址到设置装备摆设文件"""data,error=self.fileAppendObject(configfile)ifdata:printhelp_obj.printIPFormat()printhosts=raw_input(printhelp_obj.printInputIP())printifnothosts:printhelp_obj.printArgsNotenough()else:server_list=hosts.split()self.writeFile(data,server_list)data.close()else:printhelp_obj.printCannotCreateFile(configfile,error)defdeleteIPFromFile(self):"""从设置装备摆设文件中删除指定的IP地址"""ip_from_configfile_dict=self.readIPAsDict()ifip_from_configfile_dict:printhelp_obj.printDeleteIPFormat()hosts=raw_input(printhelp_obj.printInputIPForDelete())printiflen(hosts)==0:printhelp_obj.printArgsNotenough()else:delete_ip_list=hosts.split()foriindelete_ip_list:ifiinip_from_configfile_dict:delip_from_configfile_dict[i]printhelp_obj.printRemoveIPSuccessful(i)else:printhelp_obj.printIPNotInFile(i)ifip_from_configfile_dict:try:data=open(configfile,w)forkey,valueinip_from_configfile_dict.items():tempstring="%s:%s:%s:%s"%(key,value[port],value[user],value[pwd])data.write(encodestring(tempstring))exceptIOError,e:printprinthelp_obj.printFileError(e)printelse:data=open(configfile,w)try:data.close()except:passelse:printhelp_obj.printFileNotExistOrEmpty()defemptyConfigFile(self):"""清空全部主机设置装备摆设文件"""ifself.readIPAsDict():printok=raw_input(printhelp_obj.youSureEmptyFile())printifok==yorok==Y:try:data=open(configfile,w)exceptIOError,e:printhelp_obj.emptyFileFailure(e)#假如文件句柄被翻开过,则封闭try:data.close()printhelp_obj.emptySuccessful()except:passelse:printhelp_obj.printFileNotExistOrEmpty()defreadCommandHistory(self):"""读取汗青履行敕令"""command_history_list=[]try:data=open(command_history,r)forcmdindata.readlines():command_history_list.append(cmd.strip(
- ))data.close()exceptIOError:passreturncommand_history_listdefwriteCommandToFile(self,cmd):"""敕令写入到文件"""command_history_list=self.readCommandHistory()data,error=self.fileAppendObject(command_history)ifdata:ifcmdnotincommand_history_list:data.write(cmd+
- )data.close()else:printhelp_obj.printCannotCreateFile(command_history,error)defwriteCommandResultToFile(self,result_list):"""敕令输入成果写入到文件"""data,error=self.fileAppendObject(command_result_history)ifdata:data.write(printhelp_obj.returnDateString())data.write(.join(result_list))data.write(
- )data.close()else:printhelp_obj.printCannotCreateFile(command_result_history,error)#衔接SSH和SFTP类的父类classConnect(object):def__init__(self):self.connect_pool_dict={}self.ip_list=[]self.thread_num=NonedefgetIPList(self):"""获得SSH/SFTP衔接胜利的IP地址"""returnself.ip_listdefgetThreadNum(self):"""获得到线程数目,是经由过程盘算IP地址数目获得"""returnself.thread_numdefgetConnectionPool(self):"""获得SFTP/SSH衔接池信息"""returnself.connect_pool_dict#衔接SSH类classConnectSSH(Connect):defconnectSSH(self):"""衔接到SSH办事"""paramiko.util.log_to_file(EasyXMS_log)server_dict=readwriteconfigFile_obj.readIPAsDict()#起首取得ServerIP地址列表ifserver_dict:#这一段就是断定,在ssh的connect_pool_dict这外面现存的IP地址列表扈从设置装备摆设文件读掏出来的列表能否分歧#假如纷歧致,那末以设置装备摆设文件读掏出来的IP地址列表为准,删除过剩的衔接ifself.connect_pool_dict:connect_pool_list=self.connect_pool_dict.keys()foriinconnect_pool_list:ifinotinserver_dict:delself.connect_pool_dict[i]self.ip_list.remove(i)#这一段是增长胜利停止SSH衔接的IP地址到self.connect_pool_dict中去,同时也增长到胜利IP地址列表去forip,valueinserver_dict.items():ifipnotinself.connect_pool_dict:conn=paramiko.SSHClient()conn.set_missing_host_key_policy(paramiko.AutoAddPolicy())try:conn.connect(ip,value[port],value[user],value[pwd],timeout=0.8)self.connect_pool_dict[ip]=connself.ip_list.append(ip)except:printhelp_obj.printCanNotConnectIP(ip)self.thread_num=len(self.ip_list)else:printhelp_obj.printFileNotExistOrEmpty()defsetCommand(self,command):"""设天命令行输出的敕令"""self.command=commanddefgetCommand(self):"""前往敕令"""returnself.command#衔接到SFTP类classConnectSFTP(Connect):defconnectSFTP(self):"""衔接到SFTP办事"""paramiko.util.log_to_file(EasyXMS_log)server_dict=readwriteconfigFile_obj.readIPAsDict()#起首取得ServerIP地址列表ifserver_dict:#这一段就是断定,在sftp的connect_pool_dict这外面现存的IP地址列表扈从设置装备摆设文件读掏出来的列表能否分歧#假如纷歧致,那末以设置装备摆设文件读掏出来的IP地址列表为准,删除过剩的衔接ifself.connect_pool_dict:connect_pool_list=self.connect_pool_dict.keys()foriinconnect_pool_list:ifinotinserver_dict:delself.connect_pool_dict[i]self.ip_list.remove(i)#这一段是增长胜利停止SFTP衔接的IP地址到self.connect_pool_dict中去,同时也增长到胜利IP地址列表去forip,valueinserver_dict.items():ifipnotinself.connect_pool_dict:conn=paramiko.Transport((ip,value[port]))try:conn.connect(username=value[user],password=value[pwd])sftp=paramiko.SFTPClient.from_transport(conn)self.connect_pool_dict[ip]=sftpself.ip_list.append(ip)except:printhelp_obj.printCanNotConnectIP(ip)self.thread_num=len(self.ip_list)else:printhelp_obj.printFileNotExistOrEmpty()defgetDirectoryName(self,filename,dest):"""拼接目的文件名"""ifdest.endswith(/):dest=%s/%s%(dest.rstrip(/),filename)else:dest=%s/%s%(dest,filename)returndestdefsetFilePath(self,filepath):"""设定以后敕令行输出的文件路径"""self.filepath=filepathdefgetFilePath(self):"""前往敕令行输出的文件路径"""returnself.filepath#多线程类classMutilThreadControl(threading.Thread):defsetConnectionPool(self,pool):"""设置应用谁人衔接池有SSH和SFTP衔接池"""self.init_pool=pooldefinitIPQueueAndtConnectionPool(self):"""初始一个队列并把IP地址放入队列,前往IP地址列表的长度(指定发生线程的数目)和队列"""ifself.init_pool==ssh:ip_list=connectSSH_obj.getIPList()connect_pool_dict=connectSSH_obj.getConnectionPool()elifself.init_pool==sftp:ip_list=connectSFTP_obj.getIPList()connect_pool_dict=connectSFTP_obj.getConnectionPool()thread_num=len(ip_list)ip_queue=Queue(thread_num)foripinip_list:ip_queue.put(ip)returnip_queue,thread_num,connect_pool_dictdefrun(self):"""开端多线程履行敕令和SFTP上传文件"""ip_queue,threads_num,connect_pool_dict=self.initIPQueueAndtConnectionPool()result_list=[]ifself.init_pool==ssh:cmd=connectSSH_obj.getCommand()foriinxrange(threads_num):ip=ip_queue.get()stdin,stdout,stderr=connect_pool_dict[ip].exec_command(cmd)result=printhelp_obj.printCommandResult(ip,cmd,stdout.read(),stderr.read())result_list.append(result)readwriteconfigFile_obj.writeCommandResultToFile(result_list)elifself.init_pool==sftp:file_path=connectSFTP_obj.getFilePath().split()iflen(file_path)==2:src,dest=file_pathifexists(src)andisfile(src):filename=basename(src)dest=connectSFTP_obj.getDirectoryName(filename,dest)foriinxrange(threads_num):ip=ip_queue.get()try:connect_pool_dict[ip].put(src,dest)printhelp_obj.uploadFileOK(src,ip)exceptIOError,e:printhelp_obj.uploadFileError(src,ip,e)else:printhelp_obj.invaildFilePath(src)else:printhelp_obj.printArgsNotenough()#履行指定的举措(履行敕令上传文件清屏)classStartExecAction(object):defstartExecCommand(self):"""开端多线程履行敕令"""mutilThreadControl_ssh_obj=MutilThreadControl()mutilThreadControl_ssh_obj.setConnectionPool(ssh)ifreadwriteconfigFile_obj.readIPAsDict():printcmd=raw_input(printhelp_obj.enterCommand())printifcmd:ifcmd==qorcmd==Q:passelse:readwriteconfigFile_obj.writeCommandToFile(cmd)connectSSH_obj.setCommand(cmd)ifnotconnectSSH_obj.getConnectionPool():printhelp_obj.printSSHBePatient()connectSSH_obj.connectSSH()mutilThreadControl_ssh_obj.start()mutilThreadControl_ssh_obj.join()self.startExecCommand()else:printhelp_obj.invaildCommand()else:printhelp_obj.printFileNotExistOrEmpty()defstartSFTP(self):"""开端上传文件"""mutilThreadControl_sftp_obj=MutilThreadControl()mutilThreadControl_sftp_obj.setConnectionPool(sftp)ifreadwriteconfigFile_obj.readIPAsDict():printhelp_obj.printFilePath()printfilepath=raw_input(printhelp_obj.enterFilePath())printiffilepath:connectSFTP_obj.setFilePath(filepath)ifnotconnectSFTP_obj.getConnectionPool():printhelp_obj.printSFTPBePatient()connectSFTP_obj.connectSFTP()mutilThreadControl_sftp_obj.start()mutilThreadControl_sftp_obj.join()else:printhelp_obj.printArgsNotenough()else:printhelp_obj.printFileNotExistOrEmpty()defclearScreen(self):"""清屏"""clear_screen={win32:cls,linux2:clear,linux:clear,darwin:clear}[platform]system(clear_screen)if__name__==__main__:configfile=server.confEasyXMS_log=paramiko.logcommand_history=command_history.logcommand_result_history=command_result_history.logprinthelp_obj=PrintHelp()printhelp_obj.printHead()readwriteconfigFile_obj=ReadWriteConfigFile()connectSSH_obj=ConnectSSH()connectSFTP_obj=ConnectSFTP()startExecAction_obj=StartExecAction()input_obj=InputValue()input_obj.loopGetValue()
复制代码
出自“雷纳科斯的博客”博客,请务必保存此出处http://linux5588.blog.51cto.com/65280/1293677
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的小伙伴们! |
|