摘要: 下载地址:http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html1. 安装JDK1.7.0下载完成后在取得root权限后执行:[root@sea sea]# sudo rpm -ivh /目录/jdk-7-linux-x64.rpm执行结果:Preparing... ################################### [100%]1:jdk ##################################### [100%]Unpacking J 阅读全文
posted @ 2012-02-02 10:15 rilley 阅读(40164) 评论(0) 推荐(0) 编辑
摘要: #!/bin/python#coding=utf-8import xml.dom.minidomfrom collections import defaultdictclass Configure: def __init__(self, file): self.params = {} self.configs = [] self.lists = ['list', 'map', 'tuple'] self.configFile = file self.parseAll() def parseAll(self): ... 阅读全文
posted @ 2012-02-01 11:51 rilley 阅读(413) 评论(0) 推荐(0) 编辑
摘要: os和os.path模块os.listdir(dirname):列出dirname下的目录和文件os.getcwd():获得当前工作目录os.curdir:返回但前目录('.')os.chdir(dirname):改变工作目录到dirnameos.path.isdir(name):判断name是不是一个目录,name不是目录就返回falseos.path.isfile(name):判断name是不是一个文件,不存在name也返回falseos.path.exists(name):判断是否存在文件或目录nameos.path.getsize(name):获得文件大小,如果name 阅读全文
posted @ 2012-02-01 11:42 rilley 阅读(402) 评论(0) 推荐(0) 编辑
摘要: 分布式日志系统Scribescribe 是facebook 开源的分布式日志系统。其使用了thrift传输log,由于使用thrift,所以不论是什么语言的项目都可以实现日志收集,可达到远程或者是本地同步远程的分布式日志收集效果,在其示例配置中,并发量可达到max_msg_per_second=2000000,对普通的应用来说,每秒上百万的访问量可能性很小,因此基本上即使最简单的配置,远程收集所有项目的log也是可靠的,如果压力大的话,可以采取主从的配置,将日志打到本地后由scribe的主从配置来自动同步。下面讲述如何安装和使用scribe。1 下载boost、thrift、scribesof 阅读全文
posted @ 2011-12-21 11:55 rilley 阅读(1573) 评论(0) 推荐(0) 编辑