上一页 1 ··· 54 55 56 57 58 59 60 61 62 ··· 70 下一页
摘要: #!/usr/bin/env python#todo: del some elem in the listtest_list = [1,2,3,5,6,7,8,9,10,11,12]del_list = test_list[:]for i in test_list: if i % 4 == 0 an 阅读全文
posted @ 2018-05-18 12:23 littlevigra 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 让内网机器访问不通机房的机器,架构如下 (172.16.10.5) (172.17.9.109 可以出外网,开启路由转发) (内网 192.168.36.19 能ping 同9.109,但不能ping 通10.5) SNAT: iptables -t nat -I POSTROUTING -d 17 阅读全文
posted @ 2018-05-18 12:20 littlevigra 阅读(182) 评论(1) 推荐(0) 编辑
摘要: 1、useradd clouder2、解压缩mysql.tar.bz2到/home/clouder2、mv /etc/my.cnf /etc/my.cnf.bak3、/home/clouder/mysql/scripts/mysql_install_db --basedir=/home/cloude 阅读全文
posted @ 2018-05-18 11:09 littlevigra 阅读(165) 评论(1) 推荐(0) 编辑
摘要: def debug(func): def wrapper(*args, **kwargs): # 指定宇宙无敌参数 print "[DEBUG]: enter {}()".format(func.__name__) print 'Prepare and say...', return func(*a 阅读全文
posted @ 2018-05-17 10:36 littlevigra 阅读(617) 评论(2) 推荐(0) 编辑
摘要: 1)_init_函数(方法) 打印结果: 阅读全文
posted @ 2018-05-16 14:35 littlevigra 阅读(2438) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env pythondef foo(*args,**kwargs): print('args: {0}'.format(args)) print('kwargs {0}'.format(kwargs)) foo(1,2,3,a='first',b='second') 运行结果: 阅读全文
posted @ 2018-05-16 10:38 littlevigra 阅读(387) 评论(0) 推荐(0) 编辑
摘要: >>>seq = ['one', 'two', 'three'] >>> for i, element in enumerate(seq): ... print i, seq[i] ... 0 one 1 two 2 three >>> enumerate()作用就是对列表进行枚举 求一段文字的位置 阅读全文
posted @ 2018-05-15 23:44 littlevigra 阅读(635) 评论(2) 推荐(0) 编辑
摘要: 今天nagios告警: 172.17.9.76有Alert,看agent的日志有如下: (Agent-Handler-3:null) Connected to the server Lost connection to the server. Dealing with the remai 然后参考这 阅读全文
posted @ 2018-05-15 18:07 littlevigra 阅读(561) 评论(0) 推荐(0) 编辑
摘要: 由于Google的chrome不认可赛门铁克的证书,因此要更换新证书 0.8.6版本 0.9.4版本 - /etc/pki/tls/certs/iRedMail_CA.pem - /etc/ssl/certs/iRedMail.crt - /etc/pki/tls/private/iRedMail. 阅读全文
posted @ 2018-05-15 11:21 littlevigra 阅读(972) 评论(1) 推荐(0) 编辑
摘要: chmod +x /etc/rc.d/rc.localsystemctl enable rc-local.service Note: rc.local is obsolete. OR append commands to /etc/bashrc https://blog.csdn.net/ztgua 阅读全文
posted @ 2018-05-15 10:07 littlevigra 阅读(146) 评论(0) 推荐(0) 编辑
上一页 1 ··· 54 55 56 57 58 59 60 61 62 ··· 70 下一页