上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 48 下一页
摘要: 1、遍历字典 dict={'a': '1', 'b': '2', 'c': '3'} for key in dict: print(key+':'+dict[key]) ssh://root@192.168.0.204:22/usr/bin/python -u /home/progect/app/py_code/test1.py a:1 b:2 c:3 Process finis... 阅读全文
posted @ 2018-12-09 20:57 effortsing 阅读(210) 评论(0) 推荐(0) 编辑
摘要: ssh://root@192.168.0.204:22/usr/bin/python -u /home/progect/app/py_code/test1.py[0, 1, 2, 3, 4] 阅读全文
posted @ 2018-12-09 17:49 effortsing 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 1、创建元祖 tup1 = ('jenkins','mysql') print(tup1) ssh://root@192.168.0.204:22/usr/bin/python -u /home/progect/app/py_code/test1.py ('jenkins', 'mysql') Process finished with exit code 0 2、访问元祖 tup... 阅读全文
posted @ 2018-12-09 17:47 effortsing 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 问题: 用pycharm每次修改代码后第一次运行还是原来的结果,运行第二次的时候才是修改后代码的结果 解决: 每次修改代码后保存一下即可解决 阅读全文
posted @ 2018-12-09 15:27 effortsing 阅读(4364) 评论(0) 推荐(0) 编辑
摘要: 描述:之前用的好好的,突然有一天用pycharm运行程序,明明结果正确, 打印不出来结果,看下图 解决: 查看File Transfer有好多错误,意思是没有连接上服务器 [2018/12/8 21:05] Automatic upload failed: could not connect to 阅读全文
posted @ 2018-12-08 21:43 effortsing 阅读(14268) 评论(0) 推荐(0) 编辑
摘要: 之前服务器没有开启firewalld,上面有lnmp、zabbix服务,后来开启了防火墙,发现端口都在,但是不能访问zabbix,后来用firewalld把端口重新开启、重新加载后才可以访问,这就是firewalld开启的假端口 阅读全文
posted @ 2018-12-07 16:53 effortsing 阅读(181) 评论(0) 推荐(0) 编辑
摘要: # 注意:shell脚本批量执行命令,不能只写一个函数,然后把所有命令复制进去,之前试过这样是不行的。必须要有一个判断命令执行成功与否的语句 # 简单的命令可以不加结果判断符号,但是遇到解压包、sed 的命令就不往下执行了。测试过 [mysql@www ~]$ cat firewall.sh #!/bin/bash func1(){ firewall-cmd --zone=public... 阅读全文
posted @ 2018-12-07 16:47 effortsing 阅读(2242) 评论(0) 推荐(0) 编辑
摘要: 1、信息输出 nohup java -jar xxxx.jar & 2、信息不输出 nohup java -jar xxxx.jar >/dev/null 2>&1 & 阅读全文
posted @ 2018-12-07 16:34 effortsing 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 1、打成tar包 sudo tar -zcf boot.tar /boot/ 2、打成zip包 sudo zip -r boot.zip ./* 阅读全文
posted @ 2018-12-07 15:18 effortsing 阅读(390) 评论(0) 推荐(0) 编辑
摘要: 一、安装完Python3.6.5后无法使用firewalld解决 解决:需要把/usr/sbin/firewalld、/usr/bin/firewall-cmd 的头部内容改为原来的 pyton2.7 sudo sed -i "1c #!/usr/bin/python2.7" /usr/sbin/f 阅读全文
posted @ 2018-12-07 10:27 effortsing 阅读(532) 评论(0) 推荐(0) 编辑
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 48 下一页