当前位置: 首页 > news >正文

工业部网站备案高明区住房和城乡建设局网站

工业部网站备案,高明区住房和城乡建设局网站,网站最好推广的方式,英文都不懂 学网站建设维护难吗之前开发了phpmysqlshell运维监控系统#xff0c;监控起来很方便#xff0c;但在运维管理方便还是不能实现#xff0c;所以最近打算使用python语言编写一套的运维管理系统#xff0c;可以使用单台或多台机器同时管理与部署等功能#xff0c;实现类似func、triaquae等管理软…  之前开发了phpmysqlshell运维监控系统监控起来很方便但在运维管理方便还是不能实现所以最近打算使用python语言编写一套的运维管理系统可以使用单台或多台机器同时管理与部署等功能实现类似func、triaquae等管理软件功能。 本软件是参考了triaquae软件的思路对方软件地址为http://triaquae2.sinaapp.com/参考对方软件的组方面的部分代码经过与原作者Alex Li的协商允许我使用对方部分代码与思路所以我把此软件进行开源分享给大家。    下面开始安装与应用测试 一、软件的安装 软件可以到https://github.com/dl528888/auto_op/里面进行下载 1、先解压软件 rootsquid:/tmp# tar zxvf auto_op.tar.gz   auto/  auto/auto_op.py  auto/setup.py  auto/install.txt   安装前软件的结构   rootsquid:/tmp# tree auto  auto  |-- auto_op-software-install-and-function-document.docx         #中文的安装文档  |-- auto_op.py                                              #程序包  |-- install.txt                                             #软件介绍与安装说明  -- setup.py                                                #部署环境与安装           0 directories, 4 files   2、进入目录查看安装文档install.txt rootsquid:/tmp# cd auto/  rootsquid:/tmp/auto# ll  total 44  drwxr-xr-x 2 root root  4096 Mar 20 23:44 ./  drwxrwxrwt 8 root root  4096 Mar 21 09:56 ../  -rw-r--r-- 1 root root 24774 Mar 20 23:33 auto_op.py  -rw-r--r-- 1 root root   494 Mar 20 23:44 install.txt  -rw-r--r-- 1 root root  3346 Mar 20 22:53 setup.py  rootsquid:/tmp/auto# cat install.txt   Version 1.0   Introduction  This software is manage many servers.I refer to TriAquae.TriAquaes author is Alex Li.You can let all your Linux servers(or single server)  doing the same job in the same time,such as send a file,run a script,modify file,excute command and etc.   Install   1. tar zxvf auto_op.tar.gz  2. cd auto  3. python setup.py build --prefix/installdir/  4. python setup.py install  5. /installdir/auto_op.py   Support   If you have some problem , you can send mailto 244979152qq.com.   3、根据安装文档安装先指定安装目录 rootsquid:/tmp/auto# python setup.py build --prefix/usr/local/auto_op  Start to check pre-installation environment...................................   direcotry not exsit,creating successful........  If no error printed out , you can run python setup.py install to install the program   4、然后再进行安装 rootsquid:/tmp/auto# python setup.py install  Extract files to working directory...    Complete ok  Now you can run /usr/local/auto_op/auto_op.py start manage your network.   5、进入安装目录运行软件 rootsquid:/tmp/auto# cd /usr/local/auto_op/  rootsquid:/usr/local/auto_op# ll  total 36  drwxr-xr-x  2 root root  4096 Mar 21 10:02 ./  drwxr-xr-x 12 root root  4096 Mar 21 10:02 ../  -rw-r--r--  1 root root 24783 Mar 21 10:02 auto_op.py  rootsquid:/usr/local/auto_op# chmod 755 auto_op.py   rootsquid:/usr/local/auto_op# ll  total 36  drwxr-xr-x  2 root root  4096 Mar 21 10:02 ./  drwxr-xr-x 12 root root  4096 Mar 21 10:02 ../  -rwxr-xr-x  1 root root 24783 Mar 21 10:02 auto_op.py*  rootsquid:/usr/local/auto_op# ./auto_op.py   ------------------------------------Memu list-----------------------------------------------------------                  1. Add new group                  2. Rename group name                  3. Delete group                  4. List group member                  5. List host in the group                  6. Add new server to group                  7. Delete server from group                  8. Command excution on group servers                  9. Command excution on one server                  10. Upload or download on group servers                  11. Upload or download on one server                  12. Quit  --------------------------------Input number of you want to exec command---------------------------------                                                                                 Author is DengLei   可以看到有很多选项下面是介绍 1. Add new group                        #添加新组  2. Rename group name                    #对组重命名  3. Delete group                     #删除组  4. List group member                    #列出已有的组名称与成员数量  5. List host in the group                   #列出组内的主机ip  6. Add new server to group              #增加新主机到组里  7. Delete server from group             #删除组里的主机  8. Command excution on group servers        #在组内的所有主机统一执行命令  9. Command excution on one server       #对组内的某个主机执行命令  10. Upload or download on group servers #对组内的所有主机进行上传与下载文件  11. Upload or download on one server        #对组内的某个主机进行上传与下载文件  12. Quit                                #退出   安装后的软件结构 rootsquid:/tmp# tree /usr/local/auto_op/  /usr/local/auto_op/  |-- auto_op.py                          #程序包  |-- logs                                #日志目录  |   -- operation.log                   #操作日志  -- server_list                         #组目录      -- test                            #组   2 directories, 3 files   二、测试 1、选择1进行创建新组 please input you choice:1                           #选择1创建新组  please input new group name:test                        #组名为test  Created group test successful.  Do you want to add new server to Group test [ Y / N ]:y #选择添加新主机到test组里  Input new server IP or Hostname:192.168.101.235     #新主机的ip  Input newsers port:22                              #新主机的端口  Input newsers username:root                        #新主机的用户名  Input newsers password:123456                      #新主机的秘密  New server 192.168.101.235 added successfully.   2、在新创建个one组然后进行重命名组操作 please input you choice:1                            #选项1是创建新组  please input new group name:one                      #新组名为one  Created group one successful.  Do you want to add new server to Group one [ Y / N ]:n  #不添加主机到组里     ------------------------------------Memu list-----------------------------------------------------------                  1. Add new group                  2. Rename group name                  3. Delete group                  4. List group member                  5. List host in the group                  6. Add new server to group                  7. Delete server from group                  8. Command excution on group servers                  9. Command excution on one server                  10. Upload or download on group servers                  11. Upload or download on one server                  12. Quit  --------------------------------Input number of you want to exec command---------------------------------                                                                                 Author is DengLei  please input you choice:2                            #选项2是对组重命名  ---------------  Which group name do you want to change?:one          #重命名组为one  New name:first                                   #重命名为first   group name of one changed to first   3、选择4查看本机所有组的状态 please input you choice:4  now there is group is  test[1]  first[0]   可以看到test组有1个成员first没有成员 4、删除first组 please input you choice:3                                #选项3是删除组  please inupt you want to del group name:first                #输入要删除的组名  first     Are you sure you want to delete groupfirst [ Y / N ]: y         #确认是否删除  Deleted group first     ------------------------------------Memu list-----------------------------------------------------------                  1. Add new group                  2. Rename group name                  3. Delete group                  4. List group member                  5. List host in the group                  6. Add new server to group                  7. Delete server from group                  8. Command excution on group servers                  9. Command excution on one server                  10. Upload or download on group servers                  11. Upload or download on one server                  12. Quit  --------------------------------Input number of you want to exec command---------------------------------                                                                                 Author is DengLei  please input you choice:4                                #在查看一下当前的所有组  now there is group is  test[1]   5、选择5查看test组里所有的主机 please input you choice:5                                #选项5查看组内的主机   Input Group name which the server is in:test                #输入查看的组名  ------------------------Server List----------------------------  192.168.101.235                                      #test组内的主机   6、选项6增加新主机到组里 please input you choice:6                               #选项6添加新主机到组   Input Group name which the server is in:test            #选项添加新主机的组  ------------------------Server List----------------------------  192.168.101.235                                      #组内的所有主机   groupfile is /usr/local/auto_op/server_list/test  Input new server IP or Hostname:192.168.101.236         #新主机的ip  Input newsers port:22                                  #新主机的端口  Input newsers username:root                            #新主机的用户  Input newsers password:123456                       #新主机的密码  New server 192.168.101.236 added successfully.  Keep on adding new server?:[ Y / N ]y                   #是否继续添加新主机  Input new server IP or Hostname:1.1.1.1  Input newsers port:22  Input newsers username:root  Input newsers password:123456  New server 1.1.1.1 added successfully.  Keep on adding new server?:[ Y / N ]n   7、选择7删除主机从组里 please input you choice:7   Input Group name which the server is in:test  ------------------------Server List----------------------------  192.168.101.235  192.168.101.236  1.1.1.1    Notice: All matched IP adresses will be deleted,becare  Input the server IP which you want to delete:1.1.1.1  1.1.1.1  matched rows: 1  Do you want to delete all the matched rows?(y/n)y  IP 1.1.1.1 has been deleted from group test    Notice: All matched IP adresses will be deleted,becare  Input the server IP which you want to delete:you command is CTRLC go back  ------------------------------------Memu list-----------------------------------------------------------                  1. Add new group                  2. Rename group name                  3. Delete group                  4. List group member                  5. List host in the group                  6. Add new server to group                  7. Delete server from group                  8. Command excution on group servers                  9. Command excution on one server                  10. Upload or download on group servers                  11. Upload or download on one server                  12. Quit  --------------------------------Input number of you want to exec command---------------------------------                                                                                 Author is DengLei  please input you choice:5   Input Group name which the server is in:test  ------------------------Server List----------------------------  192.168.101.235  192.168.101.236   8、选项8对组内所有主机同时执行命令 please input you choice:8                    #选择8对组内所有主机执行命令  now there is group is                        #列出当前所有的组  test[2]  please input you choice group:test               #输入项执行命令的组  You choice test group  please input you want to select command,Ctrl  C to quit:hostname       #输入执行的命令  -------------------------------  start to connect ip 192.168.101.235 port 22 username root  at time 2013-03-21 10:21:51  exec result is  linux-cbb3                                                   #执行的结果   192.168.101.235 exec command [hostname] OK!  end time is 2013-03-21 10:21:51  -------------------------------  -------------------------------  start to connect ip 192.168.101.236 port 22 username root  at time 2013-03-21 10:21:51  exec result is  squid   192.168.101.236 exec command [hostname] OK!  end time is 2013-03-21 10:21:52  -------------------------------  please input you want to select command,Ctrl  C to quit:   9、选项9对组内的某个主机执行命令 please input you choice:9                            #选择9  now there is group is                                 test[2]   Input Group name which the server is in:test                                 #选择test组  ------------------------Server List----------------------------  192.168.101.235  192.168.101.236   Please input you want to execute the command of the host name:192.168.101.235   #选择主机  please input you want to select command,Ctrl  C to quit:uptime              #输入命令  -------------------------------  start to connect ip 192.168.101.235 port 22 username root  at time 2013-03-21 10:23:50  exec result is   10:25pm  up 152 days 18:02,  1 user,  load average: 0.07, 0.02, 0.00   192.168.101.235 exec command [uptime] OK!  end time is 2013-03-21 10:23:51  -------------------------------  please input you want to select command,Ctrl  C to quit:   10、选项10是对组内进行文件的上传与下载 please input you choice:10  ------------------------------------Memu list-----------------------------------------------------------                  1. Upload file to remote group servers                  2. Download file to remote group server                  3. Quit  --------------------------------Input number of you want to exec command---------------------------------                                                                                 Author is DengLei   可以看到选项10里有3个选项 1、把本地的文件上传到组内所有主机里 2、从组内的所有主机下载文件到本机 3、退出 我们先进行1项把本地的文件上传到组内所有主机里 please input you choice:1  now there is group is  test[2]  please input you choice group:test  You choice test group  please input you want to upload localpath file name,Ctrl  C to quit:/tmp/log   #上传本机的文件  please input you want to upload remotepath file name,Ctrl  C to quit:/tmp/test-upload-file-to-group.log        #上传到组内主机的文件名  Are you sure upload file from /tmp/log to /tmp/test-upload-file-to-group.log in the test group y  ------------------------------- #确认是否传输  start to connect ip 192.168.101.235 port 22 username root  at time 2013-03-21 10:28:46  192.168.101.235 exec put /tmp/log to /tmp/test-upload-file-to-group.log OK!  end time is 2013-03-21 10:28:47  -------------------------------  -------------------------------  start to connect ip 192.168.101.236 port 22 username root  at time 2013-03-21 10:28:47  192.168.101.236 exec put /tmp/log to /tmp/test-upload-file-to-group.log OK!  end time is 2013-03-21 10:28:47  -------------------------------   查询的话就是 please input you choice:8  now there is group is  test[2]  please input you choice group:test  You choice test group  please input you want to select command,Ctrl  C to quit:ls -l /tmp/test-upload-file-to-group.log  -------------------------------  start to connect ip 192.168.101.235 port 22 username root  at time 2013-03-21 10:30:42  exec result is  -rw-r--r-- 1 root root 21 Mar 21 22:30 /tmp/test-upload-file-to-group.log   192.168.101.235 exec command [ls -l /tmp/test-upload-file-to-group.log] OK!  end time is 2013-03-21 10:30:42  -------------------------------  -------------------------------  start to connect ip 192.168.101.236 port 22 username root  at time 2013-03-21 10:30:42  exec result is  -rw-r--r-- 1 root root 21 Mar 21 10:28 /tmp/test-upload-file-to-group.log   192.168.101.236 exec command [ls -l /tmp/test-upload-file-to-group.log] OK!  end time is 2013-03-21 10:30:43  -------------------------------   下面进行选项2从组内的所有主机下载文件到本机 please input you choice:10  ------------------------------------Memu list-----------------------------------------------------------                  1. Upload file to remote group servers                  2. Download file to remote group server                  3. Quit  --------------------------------Input number of you want to exec command---------------------------------                                                                                 Author is DengLei  please input you choice:2  now there is group is  test[2]  please input you choice group:test  You choice test group  please input you want to download localpath file name,Ctrl  C to quit:/tmp/test-download-to-group.log  please input you want to download remotepath file name,Ctrl  C to quit:/tmp/test-upload-file-to-group.log  Are you sure download file from /tmp/test-download-to-group.log to /tmp/test-upload-file-to-group.log in the test group y  -------------------------------  start to connect ip 192.168.101.235 port 22 username root  at time 2013-03-21 10:32:13  192.168.101.235 exec get /tmp/test-upload-file-to-group.log from /tmp/test-download-to-group.log_192.168.101.235 OK!  end time is 2013-03-21 10:32:13  -------------------------------  -------------------------------  start to connect ip 192.168.101.236 port 22 username root  at time 2013-03-21 10:32:13  192.168.101.236 exec get /tmp/test-upload-file-to-group.log from /tmp/test-download-to-group.log_192.168.101.236 OK!  end time is 2013-03-21 10:32:14   我这回是把之前上传的/tmp/test-upload-file-to-group.log文件给现在到本地命名为/tmp/test-download-to-group.log由于是不同主机把文件传给本机所以我在文件名后面加上了他们的ip好区分。 下面是查看的结果 please input you choice:8  now there is group is  test[2]  please input you choice group:test  You choice test group  please input you want to select command,Ctrl  C to quit:ls -l /tmp/test-download-to-group.log*  -------------------------------  start to connect ip 192.168.101.235 port 22 username root  at time 2013-03-21 10:34:22  exec result is  192.168.101.235 exec command [ls -l /tmp/test-download-to-group.log*] OK!  end time is 2013-03-21 10:34:22  -------------------------------  -------------------------------  start to connect ip 192.168.101.236 port 22 username root  at time 2013-03-21 10:34:22  exec result is  -rw-r--r-- 1 root root 21 Mar 21 10:32 /tmp/test-download-to-group.log_192.168.101.235   -rw-r--r-- 1 root root 21 Mar 21 10:32 /tmp/test-download-to-group.log_192.168.101.236   192.168.101.236 exec command [ls -l /tmp/test-download-to-group.log*] OK!  end time is 2013-03-21 10:34:23  -------------------------------   可以看到主机192.168.101.236已经获得了/tmp/test-download-to-group.log_192.168.101.235与/tmp/test-download-to-group.log_192.168.101.236的2个文件 11、选项11是进行组内某主机的上传与下载也就是单台主机的 please input you choice:11  ------------------------------------Memu list-----------------------------------------------------------                  1. Upload file to remote one server                  2. Download file to remote one server                  3. Quit  --------------------------------Input number of you want to exec command---------------------------------                                                                                 Author is DengLei   里面也有3个选项 1、从本机上传文件给远程主机 2、从远程主机下载文件给本机 3、退出 现在进行选项1从本机上传文件给远程主机 please input you choice:1  now there is group is  test[2]   Input Group name which the server is in:test  ------------------------Server List----------------------------  192.168.101.235  192.168.101.236   Please input you want to execute the command of the host name:192.168.101.235  please input you want to upload localpath file name,Ctrl  C to quit:/tmp/test-download-to-group.log_192.168.101.236  please input you want to upload remotepath file name,Ctrl  C to quit:/tmp/test-upload-to-host.log  Are you sure upload file from /tmp/test-download-to-group.log_192.168.101.236 to /tmp/test-upload-to-host.log in the 192.168.101.235 host y  -------------------------------  start to connect ip 192.168.101.235 port 22 username root  at time 2013-03-21 10:38:44  192.168.101.235 exec put /tmp/test-download-to-group.log_192.168.101.236 to /tmp/test-upload-to-host.log OK!  end time is 2013-03-21 10:38:44  -------------------------------   然后查询 please input you choice:9  now there is group is  test[2]   Input Group name which the server is in:test  ------------------------Server List----------------------------  192.168.101.235  192.168.101.236   Please input you want to execute the command of the host name:192.168.101.235  please input you want to select command,Ctrl  C to quit:ls -l /tmp/test-upload-to-host.log  -------------------------------  start to connect ip 192.168.101.235 port 22 username root  at time 2013-03-21 10:39:59  exec result is  -rw-r--r-- 1 root root 21 Mar 21 22:40 /tmp/test-upload-to-host.log   192.168.101.235 exec command [ls -l /tmp/test-upload-to-host.log] OK!  end time is 2013-03-21 10:40:00  -------------------------------   可以看到文件已经上传到192.168.101.235主机了 现在进行选项2从远程主机下载文件给本机 please input you choice:11  ------------------------------------Memu list-----------------------------------------------------------                  1. Upload file to remote one server                  2. Download file to remote one server                  3. Quit  --------------------------------Input number of you want to exec command---------------------------------                                                                                 Author is DengLei  please input you choice:2  now there is group is  test[2]   Input Group name which the server is in:test  ------------------------Server List----------------------------  192.168.101.235  192.168.101.236   Please input you want to execute the command of the host name:192.168.101.235  please input you want to download localpath file name,Ctrl  C to quit:/tmp/test-download-to-host.log  please input you want to download remotepath file name,Ctrl  C to quit:/tmp/test-upload-to-host.log  Are you sure download file from /tmp/test-download-to-host.log to /tmp/test-upload-to-host.log in the 192.168.101.235 host y  -------------------------------  start to connect ip 192.168.101.235 port 22 username root  at time 2013-03-21 10:41:04  192.168.101.235 exec get /tmp/test-upload-to-host.log from /tmp/test-download-to-host.log_192.168.101.235 OK!  end time is 2013-03-21 10:41:04  -------------------------------   进行查看 please input you choice:9  now there is group is  test[2]   Input Group name which the server is in:test  ------------------------Server List----------------------------  192.168.101.235  192.168.101.236   Please input you want to execute the command of the host name:192.168.101.236  please input you want to select command,Ctrl  C to quit:ls -l /tmp/test-download-to-host.log_192.168.101.235  -------------------------------  start to connect ip 192.168.101.236 port 22 username root  at time 2013-03-21 10:41:45  exec result is  -rw-r--r-- 1 root root 21 Mar 21 10:41 /tmp/test-download-to-host.log_192.168.101.235   192.168.101.236 exec command [ls -l /tmp/test-download-to-host.log_192.168.101.235] OK!  end time is 2013-03-21 10:41:46  -------------------------------   也传输成功 12、操作日志查看 所有的操作都有存放到日志里方便查看 rootsquid:/tmp# cd /usr/local/auto_op/  rootsquid:/usr/local/auto_op# ll  total 44  drwxr-xr-x  4 root root  4096 Mar 21 10:03 ./  drwxr-xr-x 12 root root  4096 Mar 21 10:02 ../  -rwxr-xr-x  1 root root 24783 Mar 21 10:02 auto_op.py*  drwxr-xr-x  2 root root  4096 Mar 21 10:09 logs/  drwxr-xr-x  2 root root  4096 Mar 21 10:19 server_list/  rootsquid:/usr/local/auto_op# cd logs/  rootsquid:/usr/local/auto_op/logs# ll  total 16  drwxr-xr-x 2 root root 4096 Mar 21 10:09 ./  drwxr-xr-x 4 root root 4096 Mar 21 10:03 ../  -rw-r--r-- 1 root root 5415 Mar 21 10:41 operation.log  rootsquid:/usr/local/auto_op/logs# tail -f operation.log   2013-03-21 10:36:40   show group test server list[192.168.101.235, 192.168.101.236]  2013-03-21 10:38:44   192.168.101.235 exec put /tmp/test-download-to-group.log_192.168.101.236 to /tmp/test-upload-to-host.log OK!  2013-03-21 10:39:08   show group test server list[192.168.101.235, 192.168.101.236]  2013-03-21 10:39:25   192.168.101.235 exec command [ls -l /tmp/test-download-to-group.log_192.168.101.236] OK!  2013-03-21 10:39:50   show group test server list[192.168.101.235, 192.168.101.236]  2013-03-21 10:40:00   192.168.101.235 exec command [ls -l /tmp/test-upload-to-host.log] OK!  2013-03-21 10:40:38   show group test server list[192.168.101.235, 192.168.101.236]  2013-03-21 10:41:04   192.168.101.235 exec get /tmp/test-upload-to-host.log from /tmp/test-download-to-host.log_192.168.101.235 OK!  2013-03-21 10:41:24   show group test server list[192.168.101.235, 192.168.101.236]  2013-03-21 10:41:46   192.168.101.236 exec command [ls -l /tmp/test-download-to-host.log_192.168.101.235] OK!   可以看到之前的操作 现在本软件的所有功能就都实现了希望各位能多提供建议与问题也希望各位同仁能一起分享一下自己对运维自动化的经验多对软件进行开源谢谢。 转载于:https://blog.51cto.com/dl528888/1159510
http://www.pierceye.com/news/887119/

相关文章:

  • 如何为公司做网站算命 网站开发
  • 那些做软件的网站十大装潢公司上海
  • wordpress 仿站 主题公路建设网站
  • 接网站 建设网站建设业务员招聘
  • 江西工程建设信息网站服装公司网站建设
  • 什么店是做网站制作的dw网站结构图怎么做
  • 一个网站开发需要多久软件开发工时费用标准
  • 做网站 公司不懂英文怎么做英文的seo网站
  • 南宁企业门户网站建设价格连云港网站建设电话
  • 石林彝族网站建设网站活动页面设计
  • 网站建设流程表推广联盟有哪些平台
  • 制作网站深圳建大型门户网站
  • 网站开发招标技术规范书网站建设动态静态
  • 阿里巴巴网站开发工具北京的网站制作公司
  • 石家庄网站营销互联网运营培训课程
  • 单位网站服务的建设及维护oa软件定制开发
  • 银川公司网站建设zepto网站开发
  • 看谁做的好舞蹈视频网站电话营销
  • 开封建网站到哪里学平面设计
  • 电子商务与网站建设实践论文化工行业网站建设
  • 如何搭建一个网站平台卖16斤肉赚200元
  • 手机主页网站推荐江宁城乡建设局网站
  • 甜品网站设计论文张家界seo
  • 单位网站及政务新媒体建设管理wordpress刷留言
  • 用花瓣网站上的图片做游戏行吗西安霸屏推广
  • 单片机和做网站医疗网站建设渠道
  • 上海做家纺的公司网站新闻发布稿
  • 广告网站大全扁平化网站psd
  • wordpress开启多站点那个网站可以做宣传
  • 专门建站的公司本网站正在建设升级中