摘要: 系统: ubuntu 1204IP: slave: 10.4.2.101 master:10.4.2.110 安装详见:http://2057.iteye.com/blog/1616620 1、创建用户 create user msuser superuser login connection limi... 阅读全文
posted @ 2013-02-22 15:10 1Q84 阅读(578) 评论(0) 推荐(0) 编辑
摘要: The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better... 阅读全文
posted @ 2013-02-18 17:56 1Q84 阅读(267) 评论(0) 推荐(1) 编辑
摘要: 首先看下functools包含的方法 Python 2.7.2 (default, Jun 20 2012, 16:23:33) [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin Type "help", "copyright", "credits" or "... 阅读全文
posted @ 2013-02-16 18:49 1Q84 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 一、greplinux下行过滤工具 语法:grep [options] └─(12:15:%)── grep ... 阅读全文
posted @ 2013-01-22 19:39 1Q84 阅读(346) 评论(0) 推荐(0) 编辑
摘要: 首先、配置下inux sysctl.conf 配置 64G For 64-bit systems with 64GB of RAM: kernel.shmmax=34359738368 kernel.shmmni=4096 kernel.shmall=16777216 vm.nr_hugepages=16384 sysctl -w kernel.s... 阅读全文
posted @ 2013-01-11 03:01 1Q84 阅读(408) 评论(0) 推荐(0) 编辑
摘要: Collections High-performance container datatypes * nametuple() * deque * Counter * OrderedDict * defaultdict 一、Counter dict subclass for counting hash able objects ... 阅读全文
posted @ 2012-12-24 19:12 1Q84 阅读(286) 评论(0) 推荐(0) 编辑
摘要: 什么是缓存: 存储使用频繁数据的临时地方。 缓存命中: 如果不是预存的话第一次要miss掉。 1、如果有足够的缓存空间,未命中的对象后面会被存储到缓存中。 2、如果缓存满了,就有根据对应的缓存策略,替换数据。即替换策略 缓存算法可以分为: 1. 基于时间的策略 2. 基于访问频率的策略 3. 基于二者坚固的策略 4. 时间距离分布策略 ... 阅读全文
posted @ 2012-12-20 17:29 1Q84 阅读(428) 评论(0) 推荐(0) 编辑
摘要: RabbitMQ是AMQP(高级消息队列协议)的标准实现 基本概念 参考文章: http://www.rabbitmq.com/getstarted.html http://www.nsbeta.info/archives/200 python demo: producer #!/usr/bin/env python import pika connec... 阅读全文
posted @ 2012-12-19 17:05 1Q84 阅读(266) 评论(0) 推荐(1) 编辑
摘要: 最近在使用rabbitmq python端用pika连接 出现错误: =ERROR REPORT==== 18-Dec-2012::19:02:56 === exception on TCP connection from 127.0.0.1:44552 {bad_header,>} 但是运行的时候出错 参考: http://rubydoc.info/gith... 阅读全文
posted @ 2012-12-18 19:50 1Q84 阅读(583) 评论(0) 推荐(0) 编辑
摘要: 一、修改root密码 1. sudo passwd 2. Password: 3. Enter new UNIX password: 4. Retype new UNIX password: 5. passed:finished update successfully. 二、修改只允许证书登陆 1. 修改/etc/... 阅读全文
posted @ 2012-12-17 17:45 1Q84 阅读(347) 评论(0) 推荐(0) 编辑