Code Monkey home page Code Monkey logo

host_manage's Introduction

主机管理

作者:王宇夫

程序介绍:

使用python3+、Windows环境使用,主机服务器用的linux;   
利用mysql、ssh、线程池的模块方法实现,主机管理。    

程序使用:

将备份文件导入mysql    
	1、进入mysql创建一个名为host_manage的库      
	CREATE DATABASE host_manage DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
	2、使用host_manage库     
	use host_manage;       
	3、导入文件     
	source 导入的文件名;      

执行主程序     
	执行bin下host_manage.py      
	输入用户名密码(数据库中有的test\123 test2\123456)     
	    1.  执行shell命令      
			看到此用户的主机地址;      
			输入要管理的主机地址,输入多个以逗号分隔;     
			输入shell命令,返回结果,打印。      
		2.  查看服务器地址      
			返回结果,打印      
		3.  增加服务器地址      
			输入ip、port、host_user、host_passwd;      
			返回状态并打印     
		4.  修改服务器地址     
			输入要修改的ip;     
			输入要修改的列名;     
			输入要修改的值;     
			返回收影响行数,打印。     
		5.  删除服务器地址     
			输入要删除的ip;    
			返回收影响行数,打印。     
		6.  退出     
			退出当前程序      

host_manage's People

Contributors

wangyufu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.