<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>HackGou In Lamp&#124;憨狗点灯 &#187; dreamhost</title>
	<atom:link href="http://hackgou.itbbq.com/category/dreamhost/feed" rel="self" type="application/rss+xml" />
	<link>http://hackgou.itbbq.com</link>
	<description>LAMP开放的是代码，是接口，是互操作性</description>
	<lastBuildDate>Thu, 15 Jul 2010 14:23:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>让easy_install构造自己的py thon小天地</title>
		<link>http://hackgou.itbbq.com/%e8%ae%a9easy_install%e6%9e%84%e9%80%a0%e8%87%aa%e5%b7%b1%e7%9a%84py-thon%e5%b0%8f%e5%a4%a9%e5%9c%b0.html</link>
		<comments>http://hackgou.itbbq.com/%e8%ae%a9easy_install%e6%9e%84%e9%80%a0%e8%87%aa%e5%b7%b1%e7%9a%84py-thon%e5%b0%8f%e5%a4%a9%e5%9c%b0.html#comments</comments>
		<pubDate>Mon, 18 Dec 2006 09:18:02 +0000</pubDate>
		<dc:creator>HackGou</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[dreamhost]]></category>

		<guid isPermaLink="false">http://hackgou.itbbq.com/%e8%ae%a9easy_install%e6%9e%84%e9%80%a0%e8%87%aa%e5%b7%b1%e7%9a%84py-thon%e5%b0%8f%e5%a4%a9%e5%9c%b0.html</guid>
		<description><![CDATA[在linux环境中玩、用python，常常需要安装额外的一些python lib
但是由于权限的问题，我们一般是无法往系统中/usr/local之类的目录
里面写东西的，而这些额外的lib又非得需要一个site-packages目录来安装
不可，虽然可以指定pure-lib之类的参数，但是很多时候还是会出错，尤其是现在很多python
lib都是使用的setuptools来生成安装包，更是如此要求了，
[gavin@Korea downloads]$ ll /usr/local/python24/lib/python2.4/site-packages/
total&#160;24
drwxr-xr-x&#160; 2&#160;root root 4096 Dec 18 16:05 PIL
-rw-r--r--&#160; 1&#160;root root&#160; &#160; 4 Dec 18 16:05 PIL.pth
-rw-r--r--&#160; 1&#160;root root&#160; 119 Dec 18 14:59 README
这可麻烦了，每个文件都是root的，旁人只能看，
其实这儿有个很好的解决方法：在自己的目录下面,安装一个虚拟的python：
在自己的目录下面建立一些lib、include等等的目录，构成一个独立的python小天地，这样，系统范围内没有的python库，就可以自己动手安装在自己的小天地中
安装，既不需要root权限，又可以满足自己的需求，一举两得。
这些安装步骤，当然不需要我们重新造轮子，下载
http://peak.telecommunity.com/dist/virtual-python.py
这个脚本，使用你喜欢的python（有的环境提供多个python版本，比如DreamHost）
执行一下这个virtual-python.py，就会自动在~/下面建立所需的目录(~/bin、/lib、
~/include），以及所需python版本，以及创建python所依赖的其他的.h头文件、.py库文件等等软链接，而且会在～/bin/下面copy一个可以执行的python文件，以后直接使用这个~/bin/python来执行py程序，它就会自动找到额外安装在小天地中的那些python库了。如果觉得把bin、lib、include放在~下面不好可以给virtual-python.py指定一个&#8211;prefix参数：
[gavin@Korea bin]$ python24 virtual-python.py --prefix=~/python-lib
[gavin@Korea&#160;bin]$ pwd
/home/gavin/python-lib/bin
[gavin@Korea&#160;bin]$ ll
total&#160;2360
-rwxrwxr-x&#160; 1&#160;gavin gavin 2404367 Dec 18 16:53 python
会把那些bin、lib、include安装在~/python-lib下面，
这下，你就可以使用easy__install来安装自己额外需要的那些库了，
不过等等先，由于此时使用的easy_install是系统范围的，所以它会把东西安装在
/usr/local之类的目录下，所以我们得给我们自己的环境安装一个easy_install。
下载
wget http://peak.telecommunity.com/dist/ez_setup.py
~/python-lib/bin/python&#160;ez_setup.py
Downloading&#160;http://cheeseshop.python.org/packages/2.4/s/setuptools/setuptools-0.6c3-py2.4.egg
Processing&#160;setuptools-0.6c3-py2.4.egg
creating /home/gavin/python-lib/lib/python2.4/site-packages/setuptools-0.6c3-py2.4.egg
Extracting&#160;setuptools-0.6c3-py2.4.egg to
/home/gavin/python-lib/lib/python2.4/site-packages
Adding&#160;setuptools 0.6c3 to easy-install.pth file
Installing&#160;easy_install script to /home/gavin/python-lib/bin
Installing&#160;easy_install-2.4 script to /home/gavin/python-lib/bin
&#160;
Installed /home/gavin/python-lib/lib/python2.4/site-packages/setuptools-0.6c3-py2.4.egg
Processing&#160;dependencies for [...]]]></description>
		<wfw:commentRss>http://hackgou.itbbq.com/%e8%ae%a9easy_install%e6%9e%84%e9%80%a0%e8%87%aa%e5%b7%b1%e7%9a%84py-thon%e5%b0%8f%e5%a4%a9%e5%9c%b0.html/feed</wfw:commentRss>
		<slash:comments>38</slash:comments>
		</item>
		<item>
		<title>DH真会拉生意</title>
		<link>http://hackgou.itbbq.com/dh%e7%9c%9f%e4%bc%9a%e6%8b%89%e7%94%9f%e6%84%8f.html</link>
		<comments>http://hackgou.itbbq.com/dh%e7%9c%9f%e4%bc%9a%e6%8b%89%e7%94%9f%e6%84%8f.html#comments</comments>
		<pubDate>Wed, 16 Aug 2006 17:03:00 +0000</pubDate>
		<dc:creator>blog</dc:creator>
				<category><![CDATA[dreamhost]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[生活小札]]></category>

		<guid isPermaLink="false">http://hackgou.itbbq.com/dh%e7%9c%9f%e4%bc%9a%e6%8b%89%e7%94%9f%e6%84%8f/</guid>
		<description><![CDATA[打算使用dreamhost。一直在找传说中的promo code。有了这个玩意儿，DH的“第一次”便可以打折， 到http://www.dreamhost.com/shared/comparison.html去看了看，找个最便宜的， 觉得两年的Crazy Domain Insane!主要配置：20G磁盘空间。每个月带宽：1T，并且每周增长8G，空间是绝对够了。 无限Mysql数据库支持，shell支持，呵呵，这个shell支持最好玩了，基本上我就是冲着这个去的。 自然有了shell，crontab也是不在话下的。很好玩，当然价格也不便宜：大致估价为：$7.95×24＝190.8$*8 = 1526￥。 还好最后找到了一个promo code：HPARCOKMG 最后信用卡支付的时候，发现其实才花了93.8$*8 = 750￥。差不多一半， 感觉比较意外：DH的“第一次”原来这么便宜。倒是非常感谢那个promo code。据说是最大的折扣，最后搞到了那个promo code的 一个对比图

才明白过来，其实我的价格大致为4$左右，一半一半吧。这么便宜，难怪国内很多人都往DH跑， 不过不知道为什么DH，不直接公布这些promo code。还得麻烦我们自己到处找。
]]></description>
		<wfw:commentRss>http://hackgou.itbbq.com/dh%e7%9c%9f%e4%bc%9a%e6%8b%89%e7%94%9f%e6%84%8f.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
