<?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>豆花@垃圾熊 &#187; CentOS</title>
	<atom:link href="http://www.douhua.im/tag/centos/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.douhua.im</link>
	<description>Open Source、Python、Flex/ActionScritp、Linux、CouchDB、MongoDB和Cloud</description>
	<lastBuildDate>Thu, 26 Aug 2010 21:19:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>在CentOS 5.5上安装MongoDB</title>
		<link>http://www.douhua.im/2010/07/01/centos-5-5-install-mongodb/</link>
		<comments>http://www.douhua.im/2010/07/01/centos-5-5-install-mongodb/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 16:01:11 +0000</pubDate>
		<dc:creator>豆花&#38;垃圾熊</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Mongodb]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.douhua.im/?p=449</guid>
		<description><![CDATA[首先编辑/etc/yum.repos.d下的配置文件，我修改的是epel.repo，这个配置文件是我在安装OpenVPN的时候加入的，具体参见《CentOS VPS 安装 OpenVPN》。在配置文件中加入MongoDB的Repository地址： [10gen] name=10gen Repository baseurl=http://downloads.mongodb.org/distros/centos/5.4/os/x86_64/ gpgcheck=0 然后执行： yum update yum install mongo-stable-server /etc/init.d/mongod start 安装Ruby的驱动： yum install mongo]]></description>
			<content:encoded><![CDATA[<p>首先编辑/etc/yum.repos.d下的配置文件，我修改的是epel.repo，这个配置文件是我在安装OpenVPN的时候加入的，具体参见《<a href="http://www.douhua.im/2010/02/03/centos-vps-install-openvpn/">CentOS VPS 安装 OpenVPN</a>》。在配置文件中加入MongoDB的Repository地址：</p>

<div class="wp_syntax"><div class="code"><pre class="conf" style="font-family:monospace;">[10gen]
name=10gen Repository
baseurl=http://downloads.mongodb.org/distros/centos/5.4/os/x86_64/
gpgcheck=0</pre></div></div>

<p>然后执行：</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum update
yum <span style="color: #c20cb9; font-weight: bold;">install</span> mongo-stable-server
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>mongod start</pre></div></div>

<p>安装Ruby的驱动：</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> mongo</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.douhua.im/2010/07/01/centos-5-5-install-mongodb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rubygem 缺少no such file to load zlib 错误</title>
		<link>http://www.douhua.im/2010/06/29/rubygem-no-such-file-to-load-zlib/</link>
		<comments>http://www.douhua.im/2010/06/29/rubygem-no-such-file-to-load-zlib/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 16:41:49 +0000</pubDate>
		<dc:creator>豆花&#38;垃圾熊</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Gem]]></category>
		<category><![CDATA[Rubygem]]></category>
		<category><![CDATA[zlib]]></category>

		<guid isPermaLink="false">http://www.douhua.im/?p=446</guid>
		<description><![CDATA[在CentOS 5上使用源代码安装了ruby和gem，当使用gem更新的时候却提示no such file to load zlib的错误。下意识认为zlib的包没有安装好，重装了zlib和zlib-devel，但是在一台VPS中依然出现问题，搜了一下发现安装ruby源码中的zlib可以解决这个问题。 cd ext/zlib ruby ./extconf.rb make make install]]></description>
			<content:encoded><![CDATA[<p>在CentOS 5上使用源代码安装了ruby和gem，当使用gem更新的时候却提示no such file to load zlib的错误。下意识认为zlib的包没有安装好，重装了zlib和zlib-devel，但是在一台VPS中依然出现问题，搜了一下发现安装ruby源码中的zlib可以解决这个问题。</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ext<span style="color: #000000; font-weight: bold;">/</span>zlib
ruby .<span style="color: #000000; font-weight: bold;">/</span>extconf.rb
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.douhua.im/2010/06/29/rubygem-no-such-file-to-load-zlib/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS VPS 安装 OpenVPN</title>
		<link>http://www.douhua.im/2010/02/03/centos-vps-install-openvpn/</link>
		<comments>http://www.douhua.im/2010/02/03/centos-vps-install-openvpn/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 13:24:04 +0000</pubDate>
		<dc:creator>豆花&#38;垃圾熊</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[VPS&Web Hosing]]></category>
		<category><![CDATA[photonvps.com]]></category>
		<category><![CDATA[openvpn]]></category>
		<category><![CDATA[TUN/TAP]]></category>

		<guid isPermaLink="false">http://www.douhua.im/?p=332</guid>
		<description><![CDATA[最近频繁在CentOS的VPS上安装OpenVPN，安装过程中还是颇有周折。首先是要和客服人员沟通开通TUN/TAP、iptables和NAT。有的VPS只开通iptables却没有NAT的支持，iptables设置postrouting的时候还是会失败。不管你在开通的时候怎么要求，VPS开通的时候还是要提交个ticket来处理这些事情。 默认CentOS的源里面只有很少的软件，需要安装EPEL(Extra Packages for Enterprise Linux)，这样源里面的就有openvpn了。 rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm 然后再执行安装openvpn的命令。 yum install openvpn 剩下的配置文件和别的一样，启动iptables的命令是： #1.2.3.4改成VPS分配的Main IP iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to-source 1.2.3.4 这次要再评论photonvps.com一下，购买的VPS分配的IP被Google误认为是德国的IP，看Youtube的时候总是有些影片受限制，看hulu.com的时候就没有什么问题。跟他们沟通更换IP，最后到另外一台机器上新安装了一个VPS。觉得photonvps.com的服务还是不错，是值得推荐的一家VPS厂商。 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; 杯具了，新换的IP被Google认为是法国的IP&#8230;.]]></description>
			<content:encoded><![CDATA[<p>最近频繁在CentOS的VPS上安装OpenVPN，安装过程中还是颇有周折。首先是要和客服人员沟通开通TUN/TAP、iptables和NAT。有的VPS只开通iptables却没有NAT的支持，iptables设置postrouting的时候还是会失败。不管你在开通的时候怎么要求，VPS开通的时候还是要提交个ticket来处理这些事情。</p>
<p>默认CentOS的源里面只有很少的软件，需要安装EPEL(Extra Packages for Enterprise Linux)，这样源里面的就有openvpn了。</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rpm <span style="color: #660033;">-Uvh</span> http:<span style="color: #000000; font-weight: bold;">//</span>download.fedora.redhat.com<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>epel<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">5</span><span style="color: #000000; font-weight: bold;">/</span>i386<span style="color: #000000; font-weight: bold;">/</span>epel-release-<span style="color: #000000;">5</span>-3.noarch.rpm</pre></div></div>

<p>然后再执行安装openvpn的命令。</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> openvpn</pre></div></div>

<p>剩下的配置文件和别的一样，启动iptables的命令是：</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#1.2.3.4改成VPS分配的Main IP</span>
iptables <span style="color: #660033;">-t</span> nat <span style="color: #660033;">-A</span> POSTROUTING <span style="color: #660033;">-s</span> 10.8.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">24</span> <span style="color: #660033;">-j</span> SNAT <span style="color: #660033;">--to-source</span> 1.2.3.4</pre></div></div>

<p>这次要再评论photonvps.com一下，购买的VPS分配的IP被Google误认为是德国的IP，看Youtube的时候总是有些影片受限制，看hulu.com的时候就没有什么问题。跟他们沟通更换IP，最后到另外一台机器上新安装了一个VPS。觉得photonvps.com的服务还是不错，是值得推荐的一家VPS厂商。</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
杯具了，新换的IP被Google认为是法国的IP&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.douhua.im/2010/02/03/centos-vps-install-openvpn/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>photonvps.com VPS 试用手记</title>
		<link>http://www.douhua.im/2010/01/15/photonvps-com-vps-try/</link>
		<comments>http://www.douhua.im/2010/01/15/photonvps-com-vps-try/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 07:20:52 +0000</pubDate>
		<dc:creator>豆花&#38;垃圾熊</dc:creator>
				<category><![CDATA[VPS&Web Hosing]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[dmehosting.com]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[openvpn]]></category>
		<category><![CDATA[photonvps.com]]></category>
		<category><![CDATA[rubyworks]]></category>

		<guid isPermaLink="false">http://www.douhua.im/?p=254</guid>
		<description><![CDATA[前几天说要体验使用VPS，现在就把第一个体验的经历记录一下。第一次购买的对象就是photonvps.com，购买了它最便宜的VPS练练手。每月500G的流量应该够几个人用VPN呢，这个要试一个月才知道。系统的目标是搭建起OpenVPN和一个简易的Web环境。 购买的过程都差不多，这个订单的系统应该是大多数VPS厂商都在用的。在订购的结束有一个电话通知pin code的防欺诈流程。目前这个电话还不支持国内联通的186电话，电信的189电话倒是顺利收到。这个过程在去DMEHosting.com尝试的时候总是说输入错误，最后只得放弃它那个1000G每月流量的VPS。photonvps.com是支持支付宝付款的，而且整个界面有繁体的版本可选，客服都可以用中文交流，这应该对很多人都有吸引力。 开始选的是Gentoo 2008的系统，因为最近工作都在用Gentoo做环境，对各种配置都烂熟于心了，觉得选Gentoo最容易，最后证明这是个错误的决定。第一天晚上购买成功后，第二天中午醒来的时候就收到已经开通VPS的邮件。上去折腾的时候发现是个64位的系统，内核确实是支持TUN/TAP的，但是iptables怎么都不好用。跟客服沟通的结果是这个版本的Gentoo确实有问题，iptables在上面不好用。搜了一下才发现大多数VPS厂商使用的OpenVZ是多个虚拟机共用内核的，你在虚拟机内部是没有办法定制内核的，所以只得换系统了。本想换Ubuntu试试，后觉得客服推荐CentOS肯定是在上面有成功的解决经验，所以还是商定换CentOS。 第三天中午收到开通的邮件后开始折腾CentOS，原来这个是比Gentoo 2008还老的环境。Python的环境是2.4的，网上搜了一下还是决定放弃升级Python的想法。OpenVPN安装的倒是顺利，没有大的问题，只是在安装rails的时候选用rubyworks带来的噩梦。本计划用Nginx+Rails做简单的站点，但是rubyworks安装却不成功，它的script执行失败。只得放弃它，删掉ruby相关的包，从头安装ruby，gem等。安装rails倒是顺利，安装当装thin的时候要求装C++。rubyworks安装的时候会对libstdc++的包进行升级，再安装gcc-c++的时候就会和它冲突，折腾了许久未果，只得提交一个Ticket重装了CentOS。 安装OpenVPN的时候要注意的是执行iptables命令和Gentoo下有点不同： #1.2.3.4改成VPS的IP地址 iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to-source 1.2.3.4 据说如果使用UDP协议的OpenVPN，那绑定的地址应该是VPS分配的主IP地址，否则会有问题。 photonvps.com服务还不错，Ticket相应比较及时，怪不得很多人推荐他们的VPS。]]></description>
			<content:encoded><![CDATA[<p>前几天说要体验使用VPS，现在就把第一个体验的经历记录一下。第一次购买的对象就是<a href="http://photonvps.com">photonvps.com</a>，购买了它最便宜的<a href="https://www.photonvps.com/vps.html">VPS</a>练练手。每月500G的流量应该够几个人用VPN呢，这个要试一个月才知道。系统的目标是搭建起OpenVPN和一个简易的Web环境。</p>
<p>购买的过程都差不多，这个订单的系统应该是大多数VPS厂商都在用的。在订购的结束有一个电话通知pin code的防欺诈流程。目前这个电话还不支持国内联通的186电话，电信的189电话倒是顺利收到。这个过程在去<a href="http://DMEHosting.com">DMEHosting.com</a>尝试的时候总是说输入错误，最后只得放弃它那个1000G每月流量的VPS。photonvps.com是支持支付宝付款的，而且整个界面有繁体的版本可选，客服都可以用中文交流，这应该对很多人都有吸引力。</p>
<p>开始选的是Gentoo 2008的系统，因为最近工作都在用Gentoo做环境，对各种配置都烂熟于心了，觉得选Gentoo最容易，最后证明这是个错误的决定。第一天晚上购买成功后，第二天中午醒来的时候就收到已经开通VPS的邮件。上去折腾的时候发现是个64位的系统，内核确实是支持TUN/TAP的，但是iptables怎么都不好用。跟客服沟通的结果是这个版本的Gentoo确实有问题，iptables在上面不好用。搜了一下才发现大多数VPS厂商使用的OpenVZ是多个虚拟机共用内核的，你在虚拟机内部是没有办法定制内核的，所以只得换系统了。本想换Ubuntu试试，后觉得客服推荐CentOS肯定是在上面有成功的解决经验，所以还是商定换CentOS。</p>
<p>第三天中午收到开通的邮件后开始折腾CentOS，原来这个是比Gentoo 2008还老的环境。Python的环境是2.4的，网上搜了一下还是决定放弃升级Python的想法。OpenVPN安装的倒是顺利，没有大的问题，只是在安装rails的时候选用<a href="http://rubyworks.rubyforge.org/">rubyworks</a>带来的噩梦。本计划用Nginx+Rails做简单的站点，但是rubyworks安装却不成功，它的script执行失败。只得放弃它，删掉ruby相关的包，从头安装ruby，gem等。安装rails倒是顺利，安装当装thin的时候要求装C++。rubyworks安装的时候会对libstdc++的包进行升级，再安装gcc-c++的时候就会和它冲突，折腾了许久未果，只得提交一个Ticket重装了CentOS。</p>
<p>安装OpenVPN的时候要注意的是执行iptables命令和Gentoo下有点不同：</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#1.2.3.4改成VPS的IP地址</span>
iptables <span style="color: #660033;">-t</span> nat <span style="color: #660033;">-A</span> POSTROUTING <span style="color: #660033;">-s</span> 10.8.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">24</span> <span style="color: #660033;">-j</span> SNAT <span style="color: #660033;">--to-source</span> 1.2.3.4</pre></div></div>

<p>据说如果使用UDP协议的OpenVPN，那绑定的地址应该是VPS分配的主IP地址，否则会有问题。</p>
<p>photonvps.com服务还不错，Ticket相应比较及时，怪不得很多人推荐他们的VPS。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.douhua.im/2010/01/15/photonvps-com-vps-try/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
