<?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/"
	>

<channel>
	<title>一个程序猿 &#187; LINUX</title>
	<atom:link href="http://www.sunboyu.cn/category/original/linux-original/feed" rel="self" type="application/rss+xml" />
	<link>http://www.sunboyu.cn</link>
	<description>时光不会倒流,脚步总要前进</description>
	<pubDate>Tue, 31 Jan 2012 10:50:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>linux下tokyocabinet存储引擎java接口的配置</title>
		<link>http://www.sunboyu.cn/2011/08/12/linux%e4%b8%8btokyocabinet%e5%ad%98%e5%82%a8%e5%bc%95%e6%93%8ejava%e6%8e%a5%e5%8f%a3%e7%9a%84%e9%85%8d%e7%bd%ae.shtml</link>
		<comments>http://www.sunboyu.cn/2011/08/12/linux%e4%b8%8btokyocabinet%e5%ad%98%e5%82%a8%e5%bc%95%e6%93%8ejava%e6%8e%a5%e5%8f%a3%e7%9a%84%e9%85%8d%e7%bd%ae.shtml#comments</comments>
		<pubDate>Fri, 12 Aug 2011 07:01:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Java]]></category>

		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[api]]></category>

		<category><![CDATA[java]]></category>

		<category><![CDATA[tokyocabinet]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=1432</guid>
		<description><![CDATA[tokyocabinet是一个性能极高的存储引擎，除支持传统的keyvalue存储外，还支持table表的存储，具体可以看这里 http://fallabs.com/tokyocabinet/spex-en.html#tctdbapi
使用tc常用的工具就是作者另外写的一个api：tt http://fallabs.com/tokyotyrant/  兼容memcached协议，非常好用和高效。
但这里我期望使用的是table表，它提供了C的接口，但没有php方便调用的的方式，所以张宴同学做了一个很方便的tcsql  http://blog.s135.com/tcsql/
因为我C的水平问题，一直没有写出稳定的操作接口，并且张宴同学tcsql的设计理念非常好，支持分布式的结构。
因此我改变了设计思路，并且使用我想对熟悉的java接口来做这个事情。
linux下配置过程：
环境装备：标准JDK环境
1、下载java api http://fallabs.com/tokyocabinet/javapkg/
2、解压后进入 tokyocabinet-java-1.24 目录
3、运行 ./configure &#8211;prefix=/opt/tcjava  &#038;&#038; make &#038;&#038; make install
4、环境变量配置：
这里是包含JDK的全部配置

export JAVA_HOME=/opt/jdk
export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:/opt/tcjava/lib/tokyocabinet.jar:/opt/tcjava/lib/libjtokyocabinet.so:/opt/tcjava/lib/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/tcjava/lib/
export PATH=$PATH:$JAVA_HOME/bin
export JRE_HOME=$JAVA_HOME/jrei
JAVA_OPTS="-server"
JAVA_OPTS="$JAVA_OPTS -Xms64m -Xmx128m"
JAVA_OPTS="$JAVA_OPTS -D64 -Djava.library.path=/usr/local/lib/"

把以上代码增加到 /etc/profile 文件尾部，而后 source /etc/profile
配置完成，开始测试：
进入 tokyocabinet-java-1.24/example  执行 make
然后运行  java TCTDBEX  如果看到跟代码中预期的结果，则tc的javaapi在此服务器上安装成功。
]]></description>
			<content:encoded><![CDATA[<p>tokyocabinet是一个性能极高的存储引擎，除支持传统的keyvalue存储外，还支持table表的存储，具体可以看这里 http://fallabs.com/tokyocabinet/spex-en.html#tctdbapi</p>
<p>使用tc常用的工具就是作者另外写的一个api：tt http://fallabs.com/tokyotyrant/  兼容memcached协议，非常好用和高效。</p>
<p>但这里我期望使用的是table表，它提供了C的接口，但没有php方便调用的的方式，所以张宴同学做了一个很方便的tcsql  http://blog.s135.com/tcsql/</p>
<p>因为我C的水平问题，一直没有写出稳定的操作接口，并且张宴同学tcsql的设计理念非常好，支持分布式的结构。</p>
<p>因此我改变了设计思路，并且使用我想对熟悉的java接口来做这个事情。</p>
<p>linux下配置过程：</p>
<p>环境装备：标准JDK环境</p>
<p>1、下载java api http://fallabs.com/tokyocabinet/javapkg/</p>
<p>2、解压后进入 tokyocabinet-java-1.24 目录</p>
<p>3、运行 ./configure &#8211;prefix=/opt/tcjava  &#038;&#038; make &#038;&#038; make install</p>
<p>4、环境变量配置：<br />
这里是包含JDK的全部配置<br />
<code><br />
export JAVA_HOME=/opt/jdk<br />
export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:/opt/tcjava/lib/tokyocabinet.jar:/opt/tcjava/lib/libjtokyocabinet.so:/opt/tcjava/lib/<br />
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/tcjava/lib/<br />
export PATH=$PATH:$JAVA_HOME/bin<br />
export JRE_HOME=$JAVA_HOME/jrei<br />
JAVA_OPTS="-server"<br />
JAVA_OPTS="$JAVA_OPTS -Xms64m -Xmx128m"<br />
JAVA_OPTS="$JAVA_OPTS -D64 -Djava.library.path=/usr/local/lib/"<br />
</code><br />
把以上代码增加到 /etc/profile 文件尾部，而后 source /etc/profile</p>
<p>配置完成，开始测试：</p>
<p>进入 tokyocabinet-java-1.24/example  执行 make</p>
<p>然后运行  java TCTDBEX  如果看到跟代码中预期的结果，则tc的javaapi在此服务器上安装成功。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2011/08/12/linux%e4%b8%8btokyocabinet%e5%ad%98%e5%82%a8%e5%bc%95%e6%93%8ejava%e6%8e%a5%e5%8f%a3%e7%9a%84%e9%85%8d%e7%bd%ae.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>搭建C开发环境的一个小shell，自动，得找软件包和配置文件模板</title>
		<link>http://www.sunboyu.cn/2011/08/06/%e6%90%ad%e5%bb%bac%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e7%9a%84%e4%b8%80%e4%b8%aa%e5%b0%8fshell%ef%bc%8c%e8%87%aa%e5%8a%a8%ef%bc%8c%e5%be%97%e6%89%be%e8%bd%af%e4%bb%b6%e5%8c%85%e5%92%8c%e9%85%8d.shtml</link>
		<comments>http://www.sunboyu.cn/2011/08/06/%e6%90%ad%e5%bb%bac%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e7%9a%84%e4%b8%80%e4%b8%aa%e5%b0%8fshell%ef%bc%8c%e8%87%aa%e5%8a%a8%ef%bc%8c%e5%be%97%e6%89%be%e8%bd%af%e4%bb%b6%e5%8c%85%e5%92%8c%e9%85%8d.shtml#comments</comments>
		<pubDate>Sat, 06 Aug 2011 07:42:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=1426</guid>
		<description><![CDATA[develop
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sunboyu.cn/upfiles/2011/08/develop.sh">develop</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2011/08/06/%e6%90%ad%e5%bb%bac%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e7%9a%84%e4%b8%80%e4%b8%aa%e5%b0%8fshell%ef%bc%8c%e8%87%aa%e5%8a%a8%ef%bc%8c%e5%be%97%e6%89%be%e8%bd%af%e4%bb%b6%e5%8c%85%e5%92%8c%e9%85%8d.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>mysql_udf_tc 未测试发布版</title>
		<link>http://www.sunboyu.cn/2011/03/18/mysql_udf_tc-%e6%9c%aa%e6%b5%8b%e8%af%95%e5%8f%91%e5%b8%83%e7%89%88.shtml</link>
		<comments>http://www.sunboyu.cn/2011/03/18/mysql_udf_tc-%e6%9c%aa%e6%b5%8b%e8%af%95%e5%8f%91%e5%b8%83%e7%89%88.shtml#comments</comments>
		<pubDate>Fri, 18 Mar 2011 03:11:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[mysql]]></category>

		<category><![CDATA[tc]]></category>

		<category><![CDATA[udf]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=1397</guid>
		<description><![CDATA[受伤了，没时间折腾，先发布未测试版，欢迎各种bug提交，康复后继续
mysql数据同步到tc的table表，直接写文件，php读文件查询。
看手册，不解释。
有问题加qq 176300676
#ifdef STANDARD
#include &#60;stdlib .h&#62;
#include &#60;stdio .h&#62;
#include &#60;string .h&#62;
#ifdef __WIN__
typedef unsigned __int64 ulonglong;	/* Microsofts 64 bit types */
typedef __int64 longlong;
#else
typedef unsigned long long ulonglong;
typedef long long longlong;
#endif /*__WIN__*/
#else
#include &#60;my_global .h&#62;
#include &#60;my_sys .h&#62;
#include &#60;m_string .h&#62;
#endif
#include &#60;mysql .h&#62;
#include &#60;ctype .h&#62;
&#160;
#include &#60;float .h&#62;
&#160;
&#160;
#include &#60;tcutil .h&#62;
#include &#60;tctdb .h&#62;
#include &#60;stdlib .h&#62;
#include &#60;stdbool .h&#62;
#include &#60;stdint .h&#62;
&#160;
&#160;
&#160;
#ifdef HAVE_DLOPEN
&#160;
/*&#160; &#160;TC_CREATE&#160; &#160; */
my_bool tc_create_init(UDF_INIT [...]]]></description>
			<content:encoded><![CDATA[<p>受伤了，没时间折腾，先发布未测试版，欢迎各种bug提交，康复后继续</p>
<p>mysql数据同步到tc的table表，直接写文件，php读文件查询。</p>
<p>看手册，不解释。</p>
<p>有问题加qq 176300676</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">#ifdef STANDARD</li>
<li>#include &lt;stdlib .h&gt;</li>
<li>#include &lt;stdio .h&gt;</li>
<li>#include &lt;string .h&gt;</li>
<li>#ifdef __WIN__</li>
<li>typedef unsigned __int64 ulonglong;	/* Microsofts 64 bit types */</li>
<li>typedef __int64 longlong;</li>
<li>#else</li>
<li>typedef unsigned long long ulonglong;</li>
<li>typedef long long longlong;</li>
<li>#endif /*__WIN__*/</li>
<li>#else</li>
<li>#include &lt;my_global .h&gt;</li>
<li>#include &lt;my_sys .h&gt;</li>
<li>#include &lt;m_string .h&gt;</li>
<li>#endif</li>
<li>#include &lt;mysql .h&gt;</li>
<li>#include &lt;ctype .h&gt;</li>
<li>&nbsp;</li>
<li>#include &lt;float .h&gt;</li>
<li>&nbsp;</li>
<li>&nbsp;</li>
<li>#include &lt;tcutil .h&gt;</li>
<li>#include &lt;tctdb .h&gt;</li>
<li>#include &lt;stdlib .h&gt;</li>
<li>#include &lt;stdbool .h&gt;</li>
<li>#include &lt;stdint .h&gt;</li>
<li>&nbsp;</li>
<li>&nbsp;</li>
<li>&nbsp;</li>
<li>#ifdef HAVE_DLOPEN</li>
<li>&nbsp;</li>
<li>/*&nbsp; &nbsp;TC_CREATE&nbsp; &nbsp; */</li>
<li>my_bool tc_create_init(UDF_INIT *initid, UDF_ARGS *args, char *message)</li>
<li>{</li>
<li>	return 0;</li>
<li>}</li>
<li>&nbsp;</li>
<li>void tc_create_deinit(UDF_INIT *initid)</li>
<li>{</li>
<li>}</li>
<li>&nbsp;</li>
<li>char * tc_create(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error)</li>
<li>{</li>
<li>	TCTDB *tdb;</li>
<li>	int ecode;</li>
<li>&nbsp;&nbsp; &nbsp;char *errormsg;</li>
<li>	char *tcfile;</li>
<li>	tdb = tctdbnew();</li>
<li>&nbsp;</li>
<li>	tcfile = args-&gt;args[0];</li>
<li>&nbsp;</li>
<li>&nbsp;&nbsp; &nbsp;/* open the database */</li>
<li>&nbsp;&nbsp; &nbsp;if(!tctdbopen(tdb, tcfile, TDBOWRITER | TDBOCREAT))</li>
<li>	{</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ecode = tctdbecode(tdb);</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;sprintf(errormsg, &quot;error: %s\n&quot;, tctdberrmsg(ecode));</li>
<li>&nbsp;</li>
<li>&nbsp;&nbsp; &nbsp;}</li>
<li>	else</li>
<li>	{</li>
<li>		sprintf(errormsg, &quot;OK&quot;);</li>
<li>	}</li>
<li>	*length = strlen(errormsg);</li>
<li>	return errormsg;</li>
<li>}</li>
<li>&nbsp;</li>
<li>/*&nbsp; &nbsp;TC_SET&nbsp; &nbsp; */</li>
<li>my_bool tc_set_init(UDF_INIT *initid, UDF_ARGS *args, char *message)</li>
<li>{</li>
<li>&nbsp; if (args-&gt;arg_count &lt; 3)</li>
<li>&nbsp; {</li>
<li>&nbsp;&nbsp; &nbsp;strcpy(message,&quot;Wrong arguments to metaphon;&nbsp; Use the source&quot;);</li>
<li>&nbsp;&nbsp; &nbsp;return 1;</li>
<li>&nbsp; }</li>
<li>&nbsp; return 0;</li>
<li>}</li>
<li>&nbsp;</li>
<li>&nbsp;</li>
<li>void tc_set_deinit(UDF_INIT *initid)</li>
<li>{</li>
<li>}</li>
<li>&nbsp;</li>
<li>&nbsp;</li>
<li>char *tc_set(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error)</li>
<li>{	</li>
<li>	char *dbfile,*errormsg,pkbuf[200];</li>
<li>	TCTDB *tdb;</li>
<li>	TCMAP *cols;</li>
<li>	int i = 0;</li>
<li>	int ecode,pksiz;</li>
<li>&nbsp;&nbsp; &nbsp;memcpy(result, &quot;result string&quot;, 13);</li>
<li>&nbsp;&nbsp; &nbsp;*length = 13;</li>
<li>&nbsp;</li>
<li>	dbfile = args-&gt;args[0];</li>
<li>&nbsp;</li>
<li>	tdb = tctdbnew();</li>
<li>&nbsp;</li>
<li>&nbsp;&nbsp; &nbsp;if(!tctdbopen(tdb, dbfile, TDBOWRITER | TDBOCREAT)){</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ecode = tctdbecode(tdb);</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;sprintf(errormsg, &quot;open error: %s\n&quot;, tctdberrmsg(ecode));</li>
<li>&nbsp;&nbsp; &nbsp;}</li>
<li>&nbsp;</li>
<li>	cols = tcmapnew();</li>
<li>&nbsp;</li>
<li>	for(i = 2;i&lt;args -&gt;arg_count;i++)</li>
<li>	{</li>
<li>		tcmapput2(cols, args-&gt;attributes[i], args-&gt;args[i]);	</li>
<li>	}</li>
<li>	pksiz = sprintf(pkbuf,&quot;%s&quot;,args-&gt;attributes[1]);</li>
<li>	</li>
<li>	if(!tctdbput(tdb, pkbuf, pksiz, cols)){</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ecode = tctdbecode(tdb);</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;sprintf(errormsg,&quot;put error: %s\n&quot;, tctdberrmsg(ecode));</li>
<li>&nbsp;</li>
<li>&nbsp;&nbsp; &nbsp;}</li>
<li>	else</li>
<li>	{</li>
<li>		errormsg = &quot;OK&quot;;</li>
<li>&nbsp;</li>
<li>	}</li>
<li>&nbsp;&nbsp; &nbsp;tcmapdel(cols);</li>
<li>	</li>
<li>&nbsp;</li>
<li>	if(!tctdbclose(tdb)){</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ecode = tctdbecode(tdb);</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;sprintf(errormsg, &quot;close error: %s\n&quot;, tctdberrmsg(ecode));</li>
<li>&nbsp;&nbsp; &nbsp;}</li>
<li>	*length = strlen(errormsg);</li>
<li>	return errormsg;</li>
<li>}</li>
<li>&nbsp;</li>
<li>/*&nbsp; &nbsp;TC_DEL&nbsp; &nbsp; */</li>
<li>my_bool tc_del_init(UDF_INIT *initid, UDF_ARGS *args, char *message)</li>
<li>{</li>
<li>&nbsp; if (args-&gt;arg_count &lt; 2)</li>
<li>&nbsp; {</li>
<li>&nbsp;&nbsp; &nbsp;strcpy(message,&quot;Wrong arguments to metaphon;&nbsp; Use the source&quot;);</li>
<li>&nbsp;&nbsp; &nbsp;return 1;</li>
<li>&nbsp; }</li>
<li>&nbsp; return 0;</li>
<li>}</li>
<li>void tc_del_deinit(UDF_INIT *initid)</li>
<li>{</li>
<li>}</li>
<li>char * tc_del(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error)</li>
<li>{</li>
<li>	TCTDB *tdb;</li>
<li>	char *dbfile,*errormsg,*pkbuf;</li>
<li>	int ecode;</li>
<li>&nbsp;</li>
<li>	dbfile = args-&gt;args[0];</li>
<li>	pkbuf = args-&gt;args[1];</li>
<li>&nbsp;</li>
<li>	tdb = tctdbnew();</li>
<li>&nbsp;</li>
<li>&nbsp;&nbsp; &nbsp;if(!tctdbopen(tdb, dbfile, TDBOWRITER | TDBOCREAT)){</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ecode = tctdbecode(tdb);</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;sprintf(errormsg, &quot;open error: %s\n&quot;, tctdberrmsg(ecode));</li>
<li>&nbsp;&nbsp; &nbsp;}</li>
<li>	if(!tctdbout2(tdb,pkbuf))</li>
<li>	{</li>
<li>		ecode = tctdbecode(tdb);</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;sprintf(errormsg,&quot;delete error: %s\n&quot;, tctdberrmsg(ecode));</li>
<li>	}</li>
<li>	else</li>
<li>	{</li>
<li>		errormsg = &quot;OK&quot;;</li>
<li>	}</li>
<li>	if(!tctdbclose(tdb)){</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ecode = tctdbecode(tdb);</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;sprintf(errormsg, &quot;close error: %s\n&quot;, tctdberrmsg(ecode));</li>
<li>&nbsp;&nbsp; &nbsp;}</li>
<li>	*length = strlen(errormsg);</li>
<li>	return errormsg;</li>
<li>&nbsp;</li>
<li>}</li>
<li>/*&nbsp; &nbsp;TC_SETINDEX&nbsp; &nbsp; */</li>
<li>my_bool tc_sexindex_init(UDF_INIT *initid, UDF_ARGS *args, char *message)</li>
<li>{</li>
<li>&nbsp; if (args-&gt;arg_count &lt; 2)</li>
<li>&nbsp; {</li>
<li>&nbsp;&nbsp; &nbsp;strcpy(message,&quot;Wrong arguments to metaphon;&nbsp; Use the source&quot;);</li>
<li>&nbsp;&nbsp; &nbsp;return 1;</li>
<li>&nbsp; }</li>
<li>&nbsp; return 0;</li>
<li>}</li>
<li>void tc_sexindex_deinit(UDF_INIT *initid)</li>
<li>{</li>
<li>}</li>
<li>char * tc_sexindex(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error)</li>
<li>{</li>
<li>	TCTDB *tdb;</li>
<li>	char *dbfile,*errormsg,*pkname[200];</li>
<li>	int ecode,indextype;</li>
<li>&nbsp;</li>
<li>	dbfile = args-&gt;args[0];</li>
<li>	*pkname = args-&gt;attributes[1];</li>
<li>&nbsp;</li>
<li>	tdb = tctdbnew();</li>
<li>&nbsp;</li>
<li>&nbsp;&nbsp; &nbsp;if(!tctdbopen(tdb, dbfile, TDBOWRITER | TDBOCREAT)){</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ecode = tctdbecode(tdb);</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;sprintf(errormsg, &quot;open error: %s\n&quot;, tctdberrmsg(ecode));</li>
<li>&nbsp;&nbsp; &nbsp;}</li>
<li>&nbsp;&nbsp; &nbsp;if(args-&gt;args[2]==&quot;string&quot;)</li>
<li>	{</li>
<li>		indextype = TDBITLEXICAL;</li>
<li>	}</li>
<li>	else if(args-&gt;args[2]==&quot;int&quot;)</li>
<li>	{</li>
<li>		indextype = TDBITDECIMAL;</li>
<li>	}</li>
<li>	if(!tctdbsetindex(tdb,*pkname,indextype))</li>
<li>	{</li>
<li>		ecode = tctdbecode(tdb);</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;sprintf(errormsg, &quot;setindex error: %s\n&quot;, tctdberrmsg(ecode));</li>
<li>	}</li>
<li>&nbsp;</li>
<li>	if(!tctdbclose(tdb)){</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ecode = tctdbecode(tdb);</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;sprintf(errormsg, &quot;close error: %s\n&quot;, tctdberrmsg(ecode));</li>
<li>&nbsp;&nbsp; &nbsp;}</li>
<li>	*length = strlen(errormsg);</li>
<li>	return errormsg;</li>
<li>}</li>
<li>#endif /* HAVE_DLOPEN */</li>
<li>&lt;/args&gt;&lt;/stdint&gt;&lt;/stdbool&gt;&lt;/stdlib&gt;&lt;/tctdb&gt;&lt;/tcutil&gt;&lt;/float&gt;&lt;/ctype&gt;&lt;/mysql&gt;&lt;/m_string&gt;&lt;/my_sys&gt;&lt;/my_global&gt;&lt;/string&gt;&lt;/stdio&gt;&lt;/stdlib&gt;</li></ol></div>
<p>编译安装脚本，自理</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">#!/bin/sh</li>
<li>gcc -Wall -I/opt/mysql-5.0.22/include/mysql -I/opt/tokyocabinet-1.4.46/include -I. -shared -L/usr/lib -ltokyocabinet -lz -lbz2 -lrt -lpthread -lm -lc&nbsp; udf_tt.c -o lib_mysqludf_tt.so</li>
<li>#gcc -Wall -I/opt/mysql-5.0.22/include/mysql -I. -static udf_tt.c -o lib_mysqludf_tt.so</li>
<li>cp -f ./lib_mysqludf_tt.so /usr/lib/lib_mysqludf_tt.so</li>
<li>service mysqld restart</li></ol></div>
<p>使用：</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">drop function tc_create;</li>
<li>create function tc_create returns string soname 'lib_mysqludf_tt.so';</li>
<li>&nbsp;</li>
<li>drop function tc_set;</li>
<li>create function tc_set returns string soname 'lib_mysqludf_tt.so';</li>
<li>&nbsp;</li>
<li>select tc_set(&quot;/home/sunboyu/test&quot;,`User`,`Host`) FROM user limit 1</li></ol></div>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2011/03/18/mysql_udf_tc-%e6%9c%aa%e6%b5%8b%e8%af%95%e5%8f%91%e5%b8%83%e7%89%88.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>linux挂载ntfs分区</title>
		<link>http://www.sunboyu.cn/2010/12/22/linux%e6%8c%82%e8%bd%bdntfs%e5%88%86%e5%8c%ba.shtml</link>
		<comments>http://www.sunboyu.cn/2010/12/22/linux%e6%8c%82%e8%bd%bdntfs%e5%88%86%e5%8c%ba.shtml#comments</comments>
		<pubDate>Wed, 22 Dec 2010 13:54:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[centos]]></category>

		<category><![CDATA[mount]]></category>

		<category><![CDATA[ntfs]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=1350</guid>
		<description><![CDATA[最近有点数据需要在linux环境下处理，我用的是centos，最简方式安装，默认不支持ntfs格式。
查资料后，有两种方式可以使centos支持ntfs：1、重新编译内核  2、增加一个插件
重新编译内核成本有点高，而且风险比较大，尝试以下插件后，很好用：
http://tuxera.com/opensource/ntfs-3g-2010.10.2.tgz
下载后，解压，进入目录  ./configure &#038;&#038; make &#038;&#038; make install 即可
然后查看硬盘分区信息：fdisk -l
我的移动硬盘可以显示如下信息：
Device Boot&#160; &#160; &#160; Start&#160; &#160; &#160; &#160; &#160;End&#160; &#160; &#160; Blocks&#160; &#160;Id&#160; System
/dev/sda1&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;2&#160; &#160; &#160; &#160;19457&#160; &#160;156280320&#160; &#160; f&#160; W95 Ext'd (LBA)
/dev/sda5&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;2&#160; &#160; &#160; &#160; 1306&#160; &#160; 10482381&#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>最近有点数据需要在linux环境下处理，我用的是centos，最简方式安装，默认不支持ntfs格式。</p>
<p>查资料后，有两种方式可以使centos支持ntfs：1、重新编译内核  2、增加一个插件</p>
<p>重新编译内核成本有点高，而且风险比较大，尝试以下插件后，很好用：</p>
<p>http://tuxera.com/opensource/ntfs-3g-2010.10.2.tgz</p>
<p>下载后，解压，进入目录  ./configure &#038;&#038; make &#038;&#038; make install 即可</p>
<p>然后查看硬盘分区信息：fdisk -l</p>
<p>我的移动硬盘可以显示如下信息：</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">Device Boot&nbsp; &nbsp; &nbsp; Start&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;End&nbsp; &nbsp; &nbsp; Blocks&nbsp; &nbsp;Id&nbsp; System</li>
<li>/dev/sda1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2&nbsp; &nbsp; &nbsp; &nbsp;19457&nbsp; &nbsp;156280320&nbsp; &nbsp; f&nbsp; W95 Ext'd (LBA)</li>
<li>/dev/sda5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2&nbsp; &nbsp; &nbsp; &nbsp; 1306&nbsp; &nbsp; 10482381&nbsp; &nbsp; 7&nbsp; HPFS/NTFS</li>
<li>/dev/sda6&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1307&nbsp; &nbsp; &nbsp; &nbsp; 5222&nbsp; &nbsp; 31455238+&nbsp; &nbsp;7&nbsp; HPFS/NTFS</li>
<li>/dev/sda7&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 5223&nbsp; &nbsp; &nbsp; &nbsp;19457&nbsp; &nbsp;114342606&nbsp; &nbsp; 7&nbsp; HPFS/NTFS</li></ol></div>
<p>挂载命令 mount -t ntfs-3g /dev/sda7 /data1</p>
<p>访问 /data1 即可访问/dev/sda7 分区</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2010/12/22/linux%e6%8c%82%e8%bd%bdntfs%e5%88%86%e5%8c%ba.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>使用awstats对nginx的日志进行分析</title>
		<link>http://www.sunboyu.cn/2010/12/10/%e4%bd%bf%e7%94%a8awstats%e5%af%b9nginx%e7%9a%84%e6%97%a5%e5%bf%97%e8%bf%9b%e8%a1%8c%e5%88%86%e6%9e%90.shtml</link>
		<comments>http://www.sunboyu.cn/2010/12/10/%e4%bd%bf%e7%94%a8awstats%e5%af%b9nginx%e7%9a%84%e6%97%a5%e5%bf%97%e8%bf%9b%e8%a1%8c%e5%88%86%e6%9e%90.shtml#comments</comments>
		<pubDate>Fri, 10 Dec 2010 08:13:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[awstats]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=1326</guid>
		<description><![CDATA[抛弃apache很长时间了，一直在用nginx，基于第三方的统计系统很多，故很久没有分析过web服务器的日志。最近日志突然暴增，从站长统计无法看出具体暴增的原因，故配置awstats进行分析。
awstats在nginx上运行，这个配置我没做过，所以，我依然使用apache作为awstats的服务器使用。只不过换一个端口而已。
apache配置：安装请看之前的日志，配置文件增加一行配置，具体为
&#60;directory &#34;/opt/httpd-2.2.9/cgi-bin&#34;&#62;
&#160;&#160; &#160;AddHandler cgi-script .pl .cgi&#160; #这行即可
&#160;&#160; &#160;AllowOverride None
&#160;&#160; &#160;Options None
&#160;&#160; &#160;Order allow,deny
&#160;&#160; &#160;Allow from all
&#60;/directory&#62;
配置好，基本就可以启动了。注意端口号，别跟nginx重复了。
下载awstats：http://downloads.sourceforge.net/project/awstats/AWStats/7.0/awstats-7.0.tar.gz?r=http%3A%2F%2Fawstats.sourceforge.net%2F&#038;ts=1291968393&#038;use_mirror=cdnetworks-kr-1
解压后，找到 cgi-bin classes css icon js 这几个文件夹。其中cgi-bin里的文件放到apache的 cgi-bin目录下，其他放到apache的网站根目录。
然后访问 hostname:8080/cgi-bin/awstats.pl 看是不是有结果。
配置站点：
复制 cgi-bin目录下 awstats.model.conf 文件 为 awstats.hostname.conf
修改如下几个关键点
LogFile=&#34;/home/www/log/www.google.com.log&#34; #nginx的日志
SiteDomain=&#34;www.google.com&#34;
HostAliases=&#34;localhost google.com 127.0.0.1 REGEX[myserver\.com$]&#34;
配置完这些， 基本就可以使用了。
另外，还要生成报表：命令为
/opt/httpd-2.2.9/cgi-bin/awstats.pl -update -config=hostname                为了方便，可以加到crontab里。到这里就配置完了。
]]></description>
			<content:encoded><![CDATA[<p>抛弃apache很长时间了，一直在用nginx，基于第三方的统计系统很多，故很久没有分析过web服务器的日志。最近日志突然暴增，从站长统计无法看出具体暴增的原因，故配置awstats进行分析。</p>
<p>awstats在nginx上运行，这个配置我没做过，所以，我依然使用apache作为awstats的服务器使用。只不过换一个端口而已。</p>
<p>apache配置：安装请看之前的日志，配置文件增加一行配置，具体为</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">&lt;directory &quot;/opt/httpd-2.2.9/cgi-bin&quot;&gt;</li>
<li>&nbsp;&nbsp; &nbsp;AddHandler cgi-script .pl .cgi&nbsp; #这行即可</li>
<li>&nbsp;&nbsp; &nbsp;AllowOverride None</li>
<li>&nbsp;&nbsp; &nbsp;Options None</li>
<li>&nbsp;&nbsp; &nbsp;Order allow,deny</li>
<li>&nbsp;&nbsp; &nbsp;Allow from all</li>
<li>&lt;/directory&gt;</li></ol></div>
<p>配置好，基本就可以启动了。注意端口号，别跟nginx重复了。</p>
<p>下载awstats：http://downloads.sourceforge.net/project/awstats/AWStats/7.0/awstats-7.0.tar.gz?r=http%3A%2F%2Fawstats.sourceforge.net%2F&#038;ts=1291968393&#038;use_mirror=cdnetworks-kr-1</p>
<p>解压后，找到 cgi-bin classes css icon js 这几个文件夹。其中cgi-bin里的文件放到apache的 cgi-bin目录下，其他放到apache的网站根目录。</p>
<p>然后访问 hostname:8080/cgi-bin/awstats.pl 看是不是有结果。</p>
<p>配置站点：</p>
<p>复制 cgi-bin目录下 awstats.model.conf 文件 为 awstats.hostname.conf</p>
<p>修改如下几个关键点</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">LogFile=&quot;/home/www/log/www.google.com.log&quot; #nginx的日志</li>
<li>SiteDomain=&quot;www.google.com&quot;</li>
<li>HostAliases=&quot;localhost google.com 127.0.0.1 REGEX[myserver\.com$]&quot;</li></ol></div>
<p>配置完这些， 基本就可以使用了。</p>
<p>另外，还要生成报表：命令为</p>
<p>/opt/httpd-2.2.9/cgi-bin/awstats.pl -update -config=hostname                为了方便，可以加到crontab里。到这里就配置完了。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2010/12/10/%e4%bd%bf%e7%94%a8awstats%e5%af%b9nginx%e7%9a%84%e6%97%a5%e5%bf%97%e8%bf%9b%e8%a1%8c%e5%88%86%e6%9e%90.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>iostat安装</title>
		<link>http://www.sunboyu.cn/2010/05/10/iostat%e5%ae%89%e8%a3%85.shtml</link>
		<comments>http://www.sunboyu.cn/2010/05/10/iostat%e5%ae%89%e8%a3%85.shtml#comments</comments>
		<pubDate>Mon, 10 May 2010 02:42:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=1220</guid>
		<description><![CDATA[原来一直以为iostat跟iftop一样是独立的安装包，后google发现是一个工具包中的工具，叫systat。
下载地址：http://pagesperso-orange.fr/sebastien.godard/download.html
使用说明书 http://pagesperso-orange.fr/sebastien.godard/man_iostat.html
]]></description>
			<content:encoded><![CDATA[<p>原来一直以为iostat跟iftop一样是独立的安装包，后google发现是一个工具包中的工具，叫systat。</p>
<p>下载地址：<a href="http://pagesperso-orange.fr/sebastien.godard/download.html">http://pagesperso-orange.fr/sebastien.godard/download.html</a></p>
<p>使用说明书 <a href="http://pagesperso-orange.fr/sebastien.godard/man_iostat.html">http://pagesperso-orange.fr/sebastien.godard/man_iostat.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2010/05/10/iostat%e5%ae%89%e8%a3%85.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>samba配置小结</title>
		<link>http://www.sunboyu.cn/2010/05/06/samba%e9%85%8d%e7%bd%ae%e5%b0%8f%e7%bb%93.shtml</link>
		<comments>http://www.sunboyu.cn/2010/05/06/samba%e9%85%8d%e7%bd%ae%e5%b0%8f%e7%bb%93.shtml#comments</comments>
		<pubDate>Thu, 06 May 2010 05:18:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=1218</guid>
		<description><![CDATA[最近想把本本彻底改成linux，前期准备就是要适应一切能想到的应用。跟台式的文件交互，ftp、ssh都可以，但还是觉得共享会方便，于是配置了一下samba。
本子上的系统用的是centos5.4 X64，samba软件是使用命令 yum install samba 进行安装。
首先，启动关闭samba命令
service smb start
service smb restart
service smb stop
首先配置一个公共的读写目录
mv /etc/samba/smb.conf /etc/samba/smb.conf.bak
touch /etc/samba/smb.conf
#smb.conf 内容为
[global]
workgroup = home
netbios name = notebook
server string = Samba Server
security = share
[public]
path = /home/public
browseable = yes
writeable = yes
guest ok = yes
public = yes
force user = nobody
force group = nobody
重启samba后，在windows中运行(局域网互联) 敲入 \\ip 则可以看到public共享目录
如果增加权限验证，则需要增加用户信息：samba用以下两个命令来增加用户信息
smbadduser&#160; &#160;//增加用户
mbpasswd&#160; &#160; &#160;//增加密码
配置文件如下
[global]
workgroup = ksgdfa
netbios name = ksgfdsa
server [...]]]></description>
			<content:encoded><![CDATA[<p>最近想把本本彻底改成linux，前期准备就是要适应一切能想到的应用。跟台式的文件交互，ftp、ssh都可以，但还是觉得共享会方便，于是配置了一下samba。</p>
<p>本子上的系统用的是centos5.4 X64，samba软件是使用命令 yum install samba 进行安装。</p>
<p>首先，启动关闭samba命令</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">service smb start</li>
<li>service smb restart</li>
<li>service smb stop</li></ol></div>
<p>首先配置一个公共的读写目录</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">mv /etc/samba/smb.conf /etc/samba/smb.conf.bak</li>
<li>touch /etc/samba/smb.conf</li>
<li>#smb.conf 内容为</li>
<li>[global]</li>
<li>workgroup = home</li>
<li>netbios name = notebook</li>
<li>server string = Samba Server</li>
<li>security = share</li>
<li>[public]</li>
<li>path = /home/public</li>
<li>browseable = yes</li>
<li>writeable = yes</li>
<li>guest ok = yes</li>
<li>public = yes</li>
<li>force user = nobody</li>
<li>force group = nobody</li></ol></div>
<p>重启samba后，在windows中运行(局域网互联) 敲入 \\ip 则可以看到public共享目录</p>
<p>如果增加权限验证，则需要增加用户信息：samba用以下两个命令来增加用户信息</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">smbadduser&nbsp; &nbsp;//增加用户</li>
<li>mbpasswd&nbsp; &nbsp; &nbsp;//增加密码</li></ol></div>
<p>配置文件如下</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">[global]</li>
<li>workgroup = ksgdfa</li>
<li>netbios name = ksgfdsa</li>
<li>server string = Samba Server</li>
<li>security = share</li>
<li>encrypt passwords = yes</li>
<li>smb passwd file = /etc/samba/smbpasswd</li>
<li>&nbsp;</li>
<li>&nbsp;</li>
<li>[public]</li>
<li>path = /home/public</li>
<li>browseable = yes</li>
<li>writeable = yes</li>
<li>guest ok = yes</li>
<li>public = yes</li>
<li>force user = nobody</li>
<li>force group = nobody</li>
<li>&nbsp;</li>
<li>[sunboyu]</li>
<li>path = /opt/samba/sunboyu</li>
<li>browseable = yes</li>
<li>writeable = yes</li></ol></div>
<p>补充：其中，公共目录的权限，用配置成 nobody:nobody  777<br />
而 sunboyu 目录的权限，则配置成 sunboyu:sunboyu 777</p>
<p>tips：如果配置成功后，一直无法写入文件，则检查是否关闭selinux，如果没关闭，关闭即可。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2010/05/06/samba%e9%85%8d%e7%bd%ae%e5%b0%8f%e7%bb%93.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>rsync使用小结</title>
		<link>http://www.sunboyu.cn/2010/04/17/rsync%e4%bd%bf%e7%94%a8%e5%b0%8f%e7%bb%93.shtml</link>
		<comments>http://www.sunboyu.cn/2010/04/17/rsync%e4%bd%bf%e7%94%a8%e5%b0%8f%e7%bb%93.shtml#comments</comments>
		<pubDate>Sat, 17 Apr 2010 14:28:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=1206</guid>
		<description><![CDATA[多台服务器使用，难免用到同步，工作中大量接触的是rsync，简单测试了一下其命令和应用。
rsync官方主页：  http://samba.anu.edu.au/rsync/  下载地址为：http://samba.anu.edu.au/ftp/rsync/rsync-3.0.7.tar.gz
安装：
./configure --prefix=/opt/rsync-3.0.7
make
make install
默认好像没有生成配置文件，创建 
vi /etc/rsync.conf
//填入以下内容
uid=nobody
gid=nobody
max connections=3
use chroot=no
log file=/var/log/rsyncd.log
pid file=/var/run/rsyncd.pid
lock file=/var/run/rsyncd.lock
测试的两台主机：192.168.0.20  192.168.0.30
在192.168.0.30的/etc/rsync.conf下增加以下代码
[test]&#160; &#160; &#160; &#160;//定义一个域
path=/root/test
comment=test folder
uid=root
ignore errors
read only=no
list=no
然后测试两个命令
1、把192.168.0.20上的 /root/source 目录同步到 192.168.0.30 的 /root/test上
/opt/rsync-3.0.7/bin/rsync -vazu &#8211;progress   /root/source 192.168.0.30::test
2、从192.168.0.30 的 /root/test 同步到 192.168.0.20上的/root/test
/opt/rsync-3.0.7/bin/rsync -vzrtopg &#8211;progress  192.168.0.30::test /root/test
配置权限：
在192.168.0.30上vi /etc/rsycnpass 然后 echo test:123456 >> /etc/rsycnpass
配置文件修改为
secrets file = /etc/rsyncpass
[test]&#160; &#160; &#160; &#160;//定义一个域
path=/root/test
comment=test folder
uid=root
ignore [...]]]></description>
			<content:encoded><![CDATA[<p>多台服务器使用，难免用到同步，工作中大量接触的是rsync，简单测试了一下其命令和应用。</p>
<p>rsync官方主页：  http://samba.anu.edu.au/rsync/  下载地址为：http://samba.anu.edu.au/ftp/rsync/rsync-3.0.7.tar.gz</p>
<p>安装：</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">./configure --prefix=/opt/rsync-3.0.7</li>
<li>make</li>
<li>make install</li></ol></div>
<p>默认好像没有生成配置文件，创建 </p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">vi /etc/rsync.conf</li>
<li>//填入以下内容</li>
<li>uid=nobody</li>
<li>gid=nobody</li>
<li>max connections=3</li>
<li>use chroot=no</li>
<li>log file=/var/log/rsyncd.log</li>
<li>pid file=/var/run/rsyncd.pid</li>
<li>lock file=/var/run/rsyncd.lock</li></ol></div>
<p>测试的两台主机：192.168.0.20  192.168.0.30</p>
<p>在192.168.0.30的/etc/rsync.conf下增加以下代码</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">[test]&nbsp; &nbsp; &nbsp; &nbsp;//定义一个域</li>
<li>path=/root/test</li>
<li>comment=test folder</li>
<li>uid=root</li>
<li>ignore errors</li>
<li>read only=no</li>
<li>list=no</li></ol></div>
<p>然后测试两个命令<br />
1、把192.168.0.20上的 /root/source 目录同步到 192.168.0.30 的 /root/test上<br />
/opt/rsync-3.0.7/bin/rsync -vazu &#8211;progress   /root/source 192.168.0.30::test<br />
2、从192.168.0.30 的 /root/test 同步到 192.168.0.20上的/root/test<br />
/opt/rsync-3.0.7/bin/rsync -vzrtopg &#8211;progress  192.168.0.30::test /root/test</p>
<p>配置权限：<br />
在192.168.0.30上vi /etc/rsycnpass 然后 echo test:123456 >> /etc/rsycnpass<br />
配置文件修改为</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">secrets file = /etc/rsyncpass</li>
<li>[test]&nbsp; &nbsp; &nbsp; &nbsp;//定义一个域</li>
<li>path=/root/test</li>
<li>comment=test folder</li>
<li>uid=root</li>
<li>ignore errors</li>
<li>read only=no</li>
<li>list=no</li>
<li>auth users=test</li></ol></div>
<p>则上边命令1修改为 /opt/rsync-3.0.7/bin/rsync -vazu &#8211;progress   /root/source test@192.168.0.30::test<br />
命令2改为 /opt/rsync-3.0.7/bin/rsync -vzrtopg &#8211;progress  test@192.168.0.30::test /root/test</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2010/04/17/rsync%e4%bd%bf%e7%94%a8%e5%b0%8f%e7%bb%93.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>在nginx下配置自动虚拟主机</title>
		<link>http://www.sunboyu.cn/2010/01/09/%e5%9c%a8nginx%e4%b8%8b%e9%85%8d%e7%bd%ae%e8%87%aa%e5%8a%a8%e8%99%9a%e6%8b%9f%e4%b8%bb%e6%9c%ba.shtml</link>
		<comments>http://www.sunboyu.cn/2010/01/09/%e5%9c%a8nginx%e4%b8%8b%e9%85%8d%e7%bd%ae%e8%87%aa%e5%8a%a8%e8%99%9a%e6%8b%9f%e4%b8%bb%e6%9c%ba.shtml#comments</comments>
		<pubDate>Fri, 08 Jan 2010 16:33:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[原创技术]]></category>

		<category><![CDATA[nginx]]></category>

		<category><![CDATA[虚拟主机]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=1143</guid>
		<description><![CDATA[以前用apache，很多虚拟主机的时候，用 mod_vhost_alias 模块去解决。nginx似乎没有这样的功能。
原来为了做这个功能，我用python写了一堆脚本，去自动管理nginx的配置文件，结果还是不理想。频繁重写配置文件，频繁重启，总会出现点问题。
在nginx的0.8.*下，发现了这样的功能：http://wiki.nginx.org/NginxHttpCoreModule

Since nginx 0.8.25 named captures can be used in server_name:
server {
  server_name   ~^(www\.)?(?.+)$;
  location / {
    root  /sites/$domain;
  }
}

大喜，于是乎做出如下配置，实现了nginx下自动虚拟主机的功能：
server {
&#160;&#160; &#160; listen&#160; &#160; &#160; &#160;80;
&#160;&#160; &#160; server_name&#160; ~^(?P&#60;domainname&#62;.+)\.autovhost\.sunboyu\.cn$;
&#160;&#160; &#160; location / {
&#160;&#160; &#160; &#160; &#160; #autoindex&#160; on;
&#160;&#160; &#160; &#160; &#160; root&#160; &#160;/home/vhost/$domainname;
&#160;&#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>以前用apache，很多虚拟主机的时候，用 mod_vhost_alias 模块去解决。nginx似乎没有这样的功能。</p>
<p>原来为了做这个功能，我用python写了一堆脚本，去自动管理nginx的配置文件，结果还是不理想。频繁重写配置文件，频繁重启，总会出现点问题。</p>
<p>在nginx的0.8.*下，发现了这样的功能：http://wiki.nginx.org/NginxHttpCoreModule</p>
<blockquote><p>
Since nginx 0.8.25 named captures can be used in server_name:<br />
server {<br />
  server_name   ~^(www\.)?(?<domain>.+)$;<br />
  location / {<br />
    root  /sites/$domain;<br />
  }<br />
}<br />
</domain></p></blockquote>
<p>大喜，于是乎做出如下配置，实现了nginx下自动虚拟主机的功能：</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">server {</li>
<li>&nbsp;&nbsp; &nbsp; listen&nbsp; &nbsp; &nbsp; &nbsp;80;</li>
<li>&nbsp;&nbsp; &nbsp; server_name&nbsp; ~^(?P&lt;domainname&gt;.+)\.autovhost\.sunboyu\.cn$;</li>
<li>&nbsp;&nbsp; &nbsp; location / {</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; #autoindex&nbsp; on;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; root&nbsp; &nbsp;/home/vhost/$domainname;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; index&nbsp; index.html index.htm;</li>
<li>&nbsp;&nbsp; &nbsp; }</li>
<li>&nbsp;&nbsp; &nbsp; access_log /home/autovhost.sunboyu.cn.log main;</li>
<li>}</li>
<li>&lt;/domainname&gt;</li></ol></div>
<p>测试通过。</p>
<p>我的开源虚拟主机管理系统nginx版本指日可待。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2010/01/09/%e5%9c%a8nginx%e4%b8%8b%e9%85%8d%e7%bd%ae%e8%87%aa%e5%8a%a8%e8%99%9a%e6%8b%9f%e4%b8%bb%e6%9c%ba.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>改变exec的阻塞模式</title>
		<link>http://www.sunboyu.cn/2009/12/25/%e6%94%b9%e5%8f%98exec%e7%9a%84%e9%98%bb%e5%a1%9e%e6%a8%a1%e5%bc%8f.shtml</link>
		<comments>http://www.sunboyu.cn/2009/12/25/%e6%94%b9%e5%8f%98exec%e7%9a%84%e9%98%bb%e5%a1%9e%e6%a8%a1%e5%bc%8f.shtml#comments</comments>
		<pubDate>Fri, 25 Dec 2009 02:19:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=1118</guid>
		<description><![CDATA[很多操作时间会很长，不能让用户在页面上执行PHP脚本，否则页面会被拖死。
一个不错的方案，就是提交到后台去执行。
linux有个命令 nohup command &#038; 这样就会提交到后台，而终端的用户体会不到程序执行的过程。
原来我使用这种方式 shell_exec( &#8220;nohuo php file.php &#038;&#8221; ) 进行后台提交，后来发现速度依然不快， 还是被挂起了。查看手册，exec函数有如下提示：
Note: 如果用本函数启动一个程序并希望保持在后台运行，必须确保该程序的输出被重定向到一个文件或者其它输出流去，否则 PHP 会在程序执行结束前挂起。
因此，这样修改就达到了目的：
exec( &#8220;nohuo php file.php >> /dev/null &#038;&#8221; ) 
]]></description>
			<content:encoded><![CDATA[<p>很多操作时间会很长，不能让用户在页面上执行PHP脚本，否则页面会被拖死。</p>
<p>一个不错的方案，就是提交到后台去执行。</p>
<p>linux有个命令 nohup command &#038; 这样就会提交到后台，而终端的用户体会不到程序执行的过程。</p>
<p>原来我使用这种方式 shell_exec( &#8220;nohuo php file.php &#038;&#8221; ) 进行后台提交，后来发现速度依然不快， 还是被挂起了。查看手册，exec函数有如下提示：</p>
<blockquote><p>Note: 如果用本函数启动一个程序并希望保持在后台运行，必须确保该程序的输出被重定向到一个文件或者其它输出流去，否则 PHP 会在程序执行结束前挂起。</p></blockquote>
<p>因此，这样修改就达到了目的：</p>
<p>exec( &#8220;nohuo php file.php >> /dev/null &#038;&#8221; ) </p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/12/25/%e6%94%b9%e5%8f%98exec%e7%9a%84%e9%98%bb%e5%a1%9e%e6%a8%a1%e5%bc%8f.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>nginx做反向代理的配置</title>
		<link>http://www.sunboyu.cn/2009/12/16/nginx%e5%81%9a%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86%e7%9a%84%e9%85%8d%e7%bd%ae.shtml</link>
		<comments>http://www.sunboyu.cn/2009/12/16/nginx%e5%81%9a%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86%e7%9a%84%e9%85%8d%e7%bd%ae.shtml#comments</comments>
		<pubDate>Wed, 16 Dec 2009 10:39:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[nginx]]></category>

		<category><![CDATA[proxy]]></category>

		<category><![CDATA[反向代理]]></category>

		<category><![CDATA[透明代理]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=1101</guid>
		<description><![CDATA[感谢铎哥的配置，感谢宴哥解决ssl连接的问题。
server
&#160;{
&#160;&#160; &#160; &#160; &#160;listen&#160; &#160; &#160; 8181;
&#160;&#160; &#160; &#160; &#160;resolver 202.96.64.68;
&#160;&#160; &#160; &#160; &#160;location /
&#160;&#160; &#160; &#160; &#160;{
&#160;&#160; &#160; &#160; &#160; &#160; &#160;proxy_pass http://$http_host$request_uri;
&#160;&#160; &#160; &#160; &#160; &#160; &#160;proxy_redirect&#160; &#160; &#160; &#160; &#160; off;
&#160;&#160; &#160; &#160; &#160; &#160; &#160;proxy_set_header&#160; &#160; &#160; &#160; Host&#160; &#160; &#160; &#160; &#160; &#160; $host;
&#160;&#160; &#160; &#160; &#160; &#160; &#160;proxy_set_header&#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>感谢铎哥的配置，感谢宴哥解决ssl连接的问题。</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">server</li>
<li>&nbsp;{</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;listen&nbsp; &nbsp; &nbsp; 8181;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;resolver 202.96.64.68;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;location /</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;proxy_pass http://$http_host$request_uri;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;proxy_redirect&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; off;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;proxy_set_header&nbsp; &nbsp; &nbsp; &nbsp; Host&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $host;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;proxy_set_header&nbsp; &nbsp; &nbsp; &nbsp; X-Real-IP&nbsp; &nbsp; &nbsp; &nbsp;$remote_addr;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;proxy_set_header&nbsp; &nbsp; &nbsp; &nbsp; X-Forwarded-For $proxy_add_x_forwarded_for;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;client_max_body_size&nbsp; &nbsp; 10m;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;client_body_buffer_size 128k;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;proxy_connect_timeout&nbsp; &nbsp;90;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;proxy_send_timeout&nbsp; &nbsp; &nbsp; 90;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;proxy_read_timeout&nbsp; &nbsp; &nbsp; 90;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;proxy_buffers&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;32 4k;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;access_log /home/proxy.log;</li>
<li>&nbsp;}</li></ol></div>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/12/16/nginx%e5%81%9a%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86%e7%9a%84%e9%85%8d%e7%bd%ae.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>django进程管理器</title>
		<link>http://www.sunboyu.cn/2009/12/16/django%e8%bf%9b%e7%a8%8b%e7%ae%a1%e7%90%86%e5%99%a8.shtml</link>
		<comments>http://www.sunboyu.cn/2009/12/16/django%e8%bf%9b%e7%a8%8b%e7%ae%a1%e7%90%86%e5%99%a8.shtml#comments</comments>
		<pubDate>Wed, 16 Dec 2009 08:42:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=1099</guid>
		<description><![CDATA[nginx+php，php有个进程管理器，为php-fpm，Django没有，网上大概看了看，找出了几段，小改一下，能用了。
#!/bin/bash
siteroot=&#34;/home/project/sun&#34;
sitename=&#34;http://python.sunboyu.cn&#34;
cd $siteroot
if [ $# -lt 1 ];then
&#160;&#160; &#160;echo &#34;Usages: server.sh [start&#124;stop&#124;restart]&#34;
&#160;&#160; &#160;exit 0
fi
&#160;
if [ $1 = start ];then
&#160;&#160; &#160;isrun=`ps aux&#124;grep &#34;manage.py runfcgi&#34;&#124;grep -v &#34;grep&#34;&#124;wc -l`
&#160;&#160; &#160;if [ $isrun -eq 1 ];then
&#160;&#160; &#160; &#160; &#160;echo $sitename&#34; has running!&#34;
&#160;&#160; &#160; &#160; &#160;exit 0
&#160;&#160; &#160;else
&#160;&#160; &#160; &#160; &#160;python manage.py runfcgi method=threaded host=127.0.0.1 port=8000 --settings=settings
&#160;&#160; &#160; &#160; &#160;echo $sitename&#34;is [...]]]></description>
			<content:encoded><![CDATA[<p>nginx+php，php有个进程管理器，为php-fpm，Django没有，网上大概看了看，找出了几段，小改一下，能用了。</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">#!/bin/bash</li>
<li>siteroot=&quot;/home/project/sun&quot;</li>
<li>sitename=&quot;http://python.sunboyu.cn&quot;</li>
<li>cd $siteroot</li>
<li>if [ $# -lt 1 ];then</li>
<li>&nbsp;&nbsp; &nbsp;echo &quot;Usages: server.sh [start|stop|restart]&quot;</li>
<li>&nbsp;&nbsp; &nbsp;exit 0</li>
<li>fi</li>
<li>&nbsp;</li>
<li>if [ $1 = start ];then</li>
<li>&nbsp;&nbsp; &nbsp;isrun=`ps aux|grep &quot;manage.py runfcgi&quot;|grep -v &quot;grep&quot;|wc -l`</li>
<li>&nbsp;&nbsp; &nbsp;if [ $isrun -eq 1 ];then</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;echo $sitename&quot; has running!&quot;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;exit 0</li>
<li>&nbsp;&nbsp; &nbsp;else</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;python manage.py runfcgi method=threaded host=127.0.0.1 port=8000 --settings=settings</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;echo $sitename&quot;is running!!&quot;</li>
<li>&nbsp;&nbsp; &nbsp;fi</li>
<li>elif [ $1 = stop ];then</li>
<li>&nbsp;&nbsp; &nbsp;djid=`ps aux|grep &quot;manage.py runfcgi&quot;|grep -v &quot;grep&quot;|awk '{print $2}'`</li>
<li>&nbsp;&nbsp; &nbsp;kill -9 $djid</li>
<li>&nbsp;&nbsp; &nbsp;echo $sitename&quot; is stop!&quot;</li>
<li>elif [ $1 = restart ];then</li>
<li>&nbsp;&nbsp; &nbsp;djid=`ps aux|grep &quot;manage.py runfcgi&quot;|grep -v &quot;grep&quot;|awk '{print $2}'`</li>
<li>&nbsp;&nbsp; &nbsp;kill -9 $djid</li>
<li>&nbsp;&nbsp; &nbsp;echo $sitename&quot; is stop!!&quot;</li>
<li>&nbsp;&nbsp; &nbsp;python manage.py runfcgi method=threaded host=127.0.0.1 port=8000 --settings=settings</li>
<li>&nbsp;&nbsp; &nbsp;echo $sitename&quot; is start!!&quot;</li>
<li>else</li>
<li>&nbsp;&nbsp; &nbsp;echo &quot;Usages: server.sh [start|stop|restart]&quot;</li>
<li>fi</li></ol></div>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/12/16/django%e8%bf%9b%e7%a8%8b%e7%ae%a1%e7%90%86%e5%99%a8.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>django+nginx的部分配置</title>
		<link>http://www.sunboyu.cn/2009/12/16/djangonginx%e7%9a%84%e9%83%a8%e5%88%86%e9%85%8d%e7%bd%ae.shtml</link>
		<comments>http://www.sunboyu.cn/2009/12/16/djangonginx%e7%9a%84%e9%83%a8%e5%88%86%e9%85%8d%e7%bd%ae.shtml#comments</comments>
		<pubDate>Wed, 16 Dec 2009 03:26:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[Python]]></category>

		<category><![CDATA[原创技术]]></category>

		<category><![CDATA[django]]></category>

		<category><![CDATA[nginx]]></category>

		<category><![CDATA[配置]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=1097</guid>
		<description><![CDATA[nginx的配置，特别感谢爱词霸的吕同学，发扬了开源共享的精神，大大缩短了我的调试成本。
server {
&#160;&#160; &#160;listen 80;
&#160;&#160; &#160;server_name python.sunboyu.cn;
&#160;&#160; &#160;location / {
&#160;&#160; &#160; &#160; &#160; &#160;fastcgi_pass 127.0.0.1:8000;
&#160;&#160; &#160; &#160; &#160; &#160;fastcgi_buffers&#160; &#160; &#160; 16&#160; 128k;
&#160;&#160; &#160; &#160; &#160; &#160;fastcgi_ignore_client_abort&#160; on;
&#160;&#160; &#160; &#160; &#160; &#160;fastcgi_read_timeout 60;
&#160;
&#160;&#160; &#160; &#160; &#160; &#160;fastcgi_param PATH_INFO $fastcgi_script_name;
&#160;&#160; &#160; &#160; &#160; &#160;fastcgi_param REQUEST_METHOD $request_method;
&#160;&#160; &#160; &#160; &#160; &#160;fastcgi_param QUERY_STRING $query_string;
&#160;&#160; &#160; &#160; &#160; &#160;fastcgi_param CONTENT_TYPE [...]]]></description>
			<content:encoded><![CDATA[<p>nginx的配置，特别感谢<a href='http://www.iciba.com/' target='_blank'>爱词霸</a>的<a href='http://blog.lvscar.info/' target='_blank'>吕同学</a>，发扬了开源共享的精神，大大缩短了我的调试成本。</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">server {</li>
<li>&nbsp;&nbsp; &nbsp;listen 80;</li>
<li>&nbsp;&nbsp; &nbsp;server_name python.sunboyu.cn;</li>
<li>&nbsp;&nbsp; &nbsp;location / {</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fastcgi_pass 127.0.0.1:8000;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fastcgi_buffers&nbsp; &nbsp; &nbsp; 16&nbsp; 128k;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fastcgi_ignore_client_abort&nbsp; on;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fastcgi_read_timeout 60;</li>
<li>&nbsp;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fastcgi_param PATH_INFO $fastcgi_script_name;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fastcgi_param REQUEST_METHOD $request_method;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fastcgi_param QUERY_STRING $query_string;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fastcgi_param CONTENT_TYPE $content_type;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fastcgi_param CONTENT_LENGTH $content_length;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fastcgi_param SERVER_PROTOCOL&nbsp; $server_protocol;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fastcgi_param SERVER_PORT&nbsp; &nbsp; &nbsp; $server_port;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fastcgi_param SERVER_NAME&nbsp; $server_name;</li>
<li>&nbsp;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fastcgi_pass_header Authorization;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fastcgi_intercept_errors off;</li>
<li>&nbsp;</li>
<li>&nbsp;&nbsp; &nbsp;}</li>
<li>}</li></ol></div>
<p>同时附上一个额外的文档，nginx变量跟cgi协议的对应关系。<br />
注：在配置中，并不是所有的变量必须加上，而是根据环境选择其中应该有的变量，至于具体加哪些变量，得求助高人了。</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">#&nbsp; &nbsp; Fast CGI param reference</li>
<li>#&nbsp; &nbsp; fastcgi_param&nbsp; &nbsp; SCRIPT_FILENAME&nbsp; $document_root$fastcgi_script_name;</li>
<li>#&nbsp; &nbsp; fastcgi_param&nbsp; &nbsp; QUERY_STRING&nbsp; $query_string;</li>
<li>#&nbsp; &nbsp; fastcgi_param&nbsp; &nbsp; REQUEST_METHOD&nbsp; $request_method;</li>
<li>#&nbsp; &nbsp; fastcgi_param&nbsp; &nbsp; CONTENT_TYPE&nbsp; $content_type;</li>
<li>#&nbsp; &nbsp; fastcgi_param&nbsp; &nbsp; CONTENT_LENGTH&nbsp; $content_length;</li>
<li>#&nbsp; &nbsp; fastcgi_param&nbsp; &nbsp; GATEWAY_INTERFACE&nbsp; CGI/1.1;</li>
<li>#&nbsp; &nbsp; fastcgi_param&nbsp; &nbsp; SERVER_SOFTWARE&nbsp; nginx;</li>
<li>#&nbsp; &nbsp; fastcgi_param&nbsp; &nbsp; SCRIPT_NAME&nbsp; $fastcgi_script_name;</li>
<li>#&nbsp; &nbsp; fastcgi_param&nbsp; &nbsp; REQUEST_URI&nbsp; $request_uri;</li>
<li>#&nbsp; &nbsp; fastcgi_param&nbsp; &nbsp; DOCUMENT_URI&nbsp; $document_uri;</li>
<li>#&nbsp; &nbsp; fastcgi_param&nbsp; &nbsp; DOCUMENT_ROOT&nbsp; $document_root;</li>
<li>#&nbsp; &nbsp; fastcgi_param&nbsp; &nbsp; SERVER_PROTOCOL&nbsp; $server_protocol;</li>
<li>#&nbsp; &nbsp; fastcgi_param&nbsp; &nbsp; REMOTE_ADDR&nbsp; $remote_addr;</li>
<li>#&nbsp; &nbsp; fastcgi_param&nbsp; &nbsp; REMOTE_PORT&nbsp; $remote_port;</li>
<li>#&nbsp; &nbsp; fastcgi_param&nbsp; &nbsp; SERVER_ADDR&nbsp; $server_addr;</li>
<li>#&nbsp; &nbsp; fastcgi_param&nbsp; &nbsp; SERVER_PORT&nbsp; $server_port;</li>
<li>#&nbsp; &nbsp; fastcgi_param&nbsp; &nbsp; SERVER_NAME&nbsp; $server_name;</li></ol></div>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/12/16/djangonginx%e7%9a%84%e9%83%a8%e5%88%86%e9%85%8d%e7%bd%ae.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>squid,nginx,apache几个代理软件的比较</title>
		<link>http://www.sunboyu.cn/2009/09/13/squidnginxapache%e5%87%a0%e4%b8%aa%e4%bb%a3%e7%90%86%e8%bd%af%e4%bb%b6%e7%9a%84%e6%af%94%e8%be%83.shtml</link>
		<comments>http://www.sunboyu.cn/2009/09/13/squidnginxapache%e5%87%a0%e4%b8%aa%e4%bb%a3%e7%90%86%e8%bd%af%e4%bb%b6%e7%9a%84%e6%af%94%e8%be%83.shtml#comments</comments>
		<pubDate>Sun, 13 Sep 2009 03:51:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[APACHE]]></category>

		<category><![CDATA[LINUX]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=988</guid>
		<description><![CDATA[最近一直在研究代理缓存之类的东东，几个软件一直在瞎鼓捣，没弄出个结果，自己也稀里糊涂，总结一下几天折腾的成绩：
在并发上，nginx无疑是老大，做反向代理的时候，没有发现squid的并发方面介绍，所以暂且认为ngnix是老大，apache的稳定性有目共睹，但在并发方面的确不是很如意。
缓存方面：squid，apache都支持diskcache和memcache，根据http的head头来确定是否缓存，nginx不支持缓存，不过我在google开源上看见了新浪的水杨老大的一个东东，给nginx加上了文件缓存，不过没有大规模使用，暂时不把它当做一种解决方案。
在代理和缓存的规则上，apache很强，很强大的重写功能，尤其是强制修改http规则，不过这个功能我始终没有调试成功，no-cache的页面始终无法去缓存。
如果只是做网站的反向代理，负载均衡，nginx感觉要比squid强，性能强悍，配置方便。
如果是做代理+缓存加速，那squid的功能和稳定性还是很好的，毕竟在互联网上大量应用。
apache呢？好像没它的事情了。当然不是，有些地方可以拿他的功能当中间件使用，这个等下次分解。
]]></description>
			<content:encoded><![CDATA[<p>最近一直在研究代理缓存之类的东东，几个软件一直在瞎鼓捣，没弄出个结果，自己也稀里糊涂，总结一下几天折腾的成绩：</p>
<p>在并发上，nginx无疑是老大，做反向代理的时候，没有发现squid的并发方面介绍，所以暂且认为ngnix是老大，apache的稳定性有目共睹，但在并发方面的确不是很如意。</p>
<p>缓存方面：squid，apache都支持diskcache和memcache，根据http的head头来确定是否缓存，nginx不支持缓存，不过我在google开源上看见了新浪的水杨老大的一个东东，给nginx加上了文件缓存，不过没有大规模使用，暂时不把它当做一种解决方案。</p>
<p>在代理和缓存的规则上，apache很强，很强大的重写功能，尤其是强制修改http规则，不过这个功能我始终没有调试成功，no-cache的页面始终无法去缓存。</p>
<p>如果只是做网站的反向代理，负载均衡，nginx感觉要比squid强，性能强悍，配置方便。</p>
<p>如果是做代理+缓存加速，那squid的功能和稳定性还是很好的，毕竟在互联网上大量应用。</p>
<p>apache呢？好像没它的事情了。当然不是，有些地方可以拿他的功能当中间件使用，这个等下次分解。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/09/13/squidnginxapache%e5%87%a0%e4%b8%aa%e4%bb%a3%e7%90%86%e8%bd%af%e4%bb%b6%e7%9a%84%e6%af%94%e8%be%83.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>给.Net程序加个cache</title>
		<link>http://www.sunboyu.cn/2009/09/06/%e7%bb%99-net%e7%a8%8b%e5%ba%8f%e5%8a%a0%e4%b8%aacache.shtml</link>
		<comments>http://www.sunboyu.cn/2009/09/06/%e7%bb%99-net%e7%a8%8b%e5%ba%8f%e5%8a%a0%e4%b8%aacache.shtml#comments</comments>
		<pubDate>Sun, 06 Sep 2009 14:47:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=984</guid>
		<description><![CDATA[朋友说一个.net的网站总被dos攻击，让给个方案，还不能贵了。听对方描述一番，感觉是iis的垃圾造成连接数的问题。
很少研究iis，但我知道linux下很多软件可以很好的提升并发连接数，于是出一简单方案去尝试。

]]></description>
			<content:encoded><![CDATA[<p>朋友说一个.net的网站总被dos攻击，让给个方案，还不能贵了。听对方描述一番，感觉是iis的垃圾造成连接数的问题。</p>
<p>很少研究iis，但我知道linux下很多软件可以很好的提升并发连接数，于是出一简单方案去尝试。</p>
<p><a href="http://www.sunboyu.cn/upfiles/2009/09/未命名-1.jpg"><img src="http://www.sunboyu.cn/upfiles/2009/09/未命名-1.jpg" alt="未命名-1" title="未命名-1" width="1000" height="684" class="aligncenter size-full wp-image-985" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/09/06/%e7%bb%99-net%e7%a8%8b%e5%ba%8f%e5%8a%a0%e4%b8%aacache.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>apache自动生成目录文件列表配置</title>
		<link>http://www.sunboyu.cn/2009/07/22/apache%e8%87%aa%e5%8a%a8%e7%94%9f%e6%88%90%e7%9b%ae%e5%bd%95%e6%96%87%e4%bb%b6%e5%88%97%e8%a1%a8%e9%85%8d%e7%bd%ae.shtml</link>
		<comments>http://www.sunboyu.cn/2009/07/22/apache%e8%87%aa%e5%8a%a8%e7%94%9f%e6%88%90%e7%9b%ae%e5%bd%95%e6%96%87%e4%bb%b6%e5%88%97%e8%a1%a8%e9%85%8d%e7%bd%ae.shtml#comments</comments>
		<pubDate>Wed, 22 Jul 2009 11:13:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[apache列目录]]></category>

		<category><![CDATA[配置]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=880</guid>
		<description><![CDATA[由于种种原因，服务器给卖掉了，因此，我做的源码目录也就没了。这里把该目录的配置属性介绍一下：
&#60;directory /home/sunboyu/www_source.sunboyu.cn&#62;
&#160;&#160; &#160; &#160; &#160;MaxConnPerIP 1
&#160;&#160; &#160; &#160; &#160;ReadmeName foot.html&#160; &#160; &#160; &#160; #页面的头
&#160;&#160; &#160; &#160; &#160;HeaderName top.html&#160; &#160; &#160; &#160; &#160; #页面的脚
&#160;&#160; &#160; &#160; &#160;IndexIgnore top.html foot.html&#160; &#160; #列目录的时候，忽略这些文件
&#160;&#160; &#160; &#160; &#160;ServerSignature Off&#160; &#160; &#160; &#160;#关闭服务器标志
&#160;&#160; &#160; &#160; &#160;IndexOptions FancyIndexing VersionSort FoldersFirst SuppressLastModified NameWidth=* Charset=UTF-8
&#160;&#160; &#160; &#160; &#160;Options FollowSymLinks
&#160;&#160; &#160; &#160; &#160;Options +Indexes
&#160;&#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>由于种种原因，服务器给卖掉了，因此，我做的源码目录也就没了。这里把该目录的配置属性介绍一下：</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">&lt;directory /home/sunboyu/www_source.sunboyu.cn&gt;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;MaxConnPerIP 1</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ReadmeName foot.html&nbsp; &nbsp; &nbsp; &nbsp; #页面的头</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;HeaderName top.html&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #页面的脚</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;IndexIgnore top.html foot.html&nbsp; &nbsp; #列目录的时候，忽略这些文件</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ServerSignature Off&nbsp; &nbsp; &nbsp; &nbsp;#关闭服务器标志</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;IndexOptions FancyIndexing VersionSort FoldersFirst SuppressLastModified NameWidth=* Charset=UTF-8</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Options FollowSymLinks</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Options +Indexes</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;AllowOverride all</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Order deny,allow</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Allow from all</li>
<li>&nbsp;&lt;/directory&gt;</li></ol></div>
<p>FancyIndexing 打开列表功能</p>
<p>VersionSort 同一文件不同版本分类列出</p>
<p>FoldersFirst 文件夹优先</p>
<p>SuppressLastModified 禁止列出最后修改时间</p>
<p>NameWidth=* 文件名长度 *当然是全部显示</p>
<p>Charset=UTF-8 页面输出编码</p>
<p>AddIcon /other/icons/exe.gif .bin .exe  给exe bin扩展名添加exe.gif图标</p>
<p>ScanHTMLTitles 如果有html文件，则度html的title为描述</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/07/22/apache%e8%87%aa%e5%8a%a8%e7%94%9f%e6%88%90%e7%9b%ae%e5%bd%95%e6%96%87%e4%bb%b6%e5%88%97%e8%a1%a8%e9%85%8d%e7%bd%ae.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>Linux配置几个关键点需要注意</title>
		<link>http://www.sunboyu.cn/2009/07/15/linux%e9%85%8d%e7%bd%ae%e5%87%a0%e4%b8%aa%e5%85%b3%e9%94%ae%e7%82%b9%e9%9c%80%e8%a6%81%e6%b3%a8%e6%84%8f.shtml</link>
		<comments>http://www.sunboyu.cn/2009/07/15/linux%e9%85%8d%e7%bd%ae%e5%87%a0%e4%b8%aa%e5%85%b3%e9%94%ae%e7%82%b9%e9%9c%80%e8%a6%81%e6%b3%a8%e6%84%8f.shtml#comments</comments>
		<pubDate>Tue, 14 Jul 2009 20:30:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[centos]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[机房]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=856</guid>
		<description><![CDATA[前两天机房断电，弄得兄弟我太郁闷。机房网管居然直接硬关机，这么来回弄了两三次，问技术，不是那一拨，问销售，没啥解释，人家说不知道……
一分钱一分货有道理，结果我机器挂了，机房那边说linux启动，中间卡死了。因为那个机房没有懂linux的网管，所以，我开车（捷安特）去了机房。
后发现，其实没什么问题，卡在了一个依赖python的启动进程上，另外mysql貌似也没有启动。
我用ubuntu live版的cd进入系统（有点像win下的PE的思路），修改了python设置：
原来python默认是2.3版本，我升级到了2.5，默认关联的是2.5版的，但这样会有一些问题，比如yum对版本依赖性很强，修改后则其不工作，所以我修改了yum的配置，让其寻找2.3版本。而另一下对python有依赖的模块我却没有发现，造成down机后无法启动。
mysql无法自启动，没找出是哪的问题，不过，我在ubuntu下加载了原来的分区，修改了rc.local配置,灭了mysql，系统顺利启动。
总结：ubuntu live cd的作用跟我修理xp时候的pe功能相似，系统挂掉的时候修改个配置啥的还是很好用的。
除非很了解软件之间的依赖性，否则不要随意修改那些配置，否则会造成依赖性问题。
事发现场图片

]]></description>
			<content:encoded><![CDATA[<p>前两天机房断电，弄得兄弟我太郁闷。机房网管居然直接硬关机，这么来回弄了两三次，问技术，不是那一拨，问销售，没啥解释，人家说不知道……</p>
<p>一分钱一分货有道理，结果我机器挂了，机房那边说linux启动，中间卡死了。因为那个机房没有懂linux的网管，所以，我开车（捷安特）去了机房。</p>
<p>后发现，其实没什么问题，卡在了一个依赖python的启动进程上，另外mysql貌似也没有启动。</p>
<p>我用ubuntu live版的cd进入系统（有点像win下的PE的思路），修改了python设置：</p>
<p>原来python默认是2.3版本，我升级到了2.5，默认关联的是2.5版的，但这样会有一些问题，比如yum对版本依赖性很强，修改后则其不工作，所以我修改了yum的配置，让其寻找2.3版本。而另一下对python有依赖的模块我却没有发现，造成down机后无法启动。</p>
<p>mysql无法自启动，没找出是哪的问题，不过，我在ubuntu下加载了原来的分区，修改了rc.local配置,灭了mysql，系统顺利启动。</p>
<p>总结：ubuntu live cd的作用跟我修理xp时候的pe功能相似，系统挂掉的时候修改个配置啥的还是很好用的。</p>
<p>除非很了解软件之间的依赖性，否则不要随意修改那些配置，否则会造成依赖性问题。</p>
<p>事发现场图片</p>
<p><a href="http://www.sunboyu.cn/upfiles/2009/07/server-mysql.jpg"><img class="aligncenter size-full wp-image-872" title="server-mysql" src="http://www.sunboyu.cn/upfiles/2009/07/server-mysql.jpg" alt="server-mysql" width="800" height="591" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/07/15/linux%e9%85%8d%e7%bd%ae%e5%87%a0%e4%b8%aa%e5%85%b3%e9%94%ae%e7%82%b9%e9%9c%80%e8%a6%81%e6%b3%a8%e6%84%8f.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>Centos4.7（Linux）下架设BT服务器</title>
		<link>http://www.sunboyu.cn/2009/06/09/centos47%ef%bc%88linux%ef%bc%89%e4%b8%8b%e6%9e%b6%e8%ae%bebt%e6%9c%8d%e5%8a%a1%e5%99%a8.shtml</link>
		<comments>http://www.sunboyu.cn/2009/06/09/centos47%ef%bc%88linux%ef%bc%89%e4%b8%8b%e6%9e%b6%e8%ae%bebt%e6%9c%8d%e5%8a%a1%e5%99%a8.shtml#comments</comments>
		<pubDate>Tue, 09 Jun 2009 05:21:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[原创技术]]></category>

		<category><![CDATA[bittorrent]]></category>

		<category><![CDATA[bt]]></category>

		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=768</guid>
		<description><![CDATA[穷人，就得想穷人的办法，带宽被坑，严重缩水，为了分享大量资源，最终决定使用bt发布一些大资源。
网上找了很多BitTorrent架设btserver的教程，不是版本不对，就是安装复杂，所以，我找了个比较老的版本，一次装上调通。
我使用了BitTorrent-3.9.1，官方下载地址为 http://download.bittorrent.com/dl/archive/BitTorrent-3.9.1.tar.gz
防止墙，我传到本地 bittorrent-3.9.1.tar.gz
首先你服务器要预装python，centos4.7预装python2.3，我预留，但服务器环境python使用了2.5版，2.3不能删，yum对版本依赖性比较强，还得预留。
解压 BitTorrent-3.9.1.tar.gz 后进入文件夹，按照说明进行安装：
python setup.py install
即可安装。当然中间会遇到各种问题，大部分是关于python版本或者依赖的，错误可以跟帖发一下，一起解决。
好了，首先启动服务器：
python bttrack.py --port 6969 --dfile dfile.log
其中port参数是服务的端口（一定记得调一下防火墙），dfile是日志
然后打开 http://ip:6969/  如果显示
BitTorrent download info
    * tracker version: 3.9.1
    * server time: 2009-06-09 05:12 UTC
则证明服务启动成功。
下面创建一个种子文件
btmaketorrent.py http://bt.sunboyu.cn:6969/announce /root/soft/xmlrpc-epi-0.54.tar.gz
这样，就针对 /root/soft/xmlrpc-epi-0.54.tar.gz 文件创建了一个种子文件，使用的track地址是 http://bt.sunboyu.cn:6969
生成的种子位置，是这样:如果针对一个文件，则在文件同一文件夹下，如果针对文件夹，则在文件夹同级目录。
然后发布一个种子（很多人可能对种子这个概念不了解，可以查看资料，关于bt协议的）
btdownloadheadless.py /root/soft/xmlrpc-epi-0.54.tar.gz.torrent --save_as /root/soft/xmlrpc-epi-0.54.tar.gz
发布种子有很多参数要限制，可以看命令具体参数，比如占用的端口跟限速等。
我测试了一下，linux发布的文件，就可以下载了。这只是服务器建立的阶段，要管理，还得写好多管理脚本，否则文件多的话，手工可受不了。
另外还有好多的开源web监控、管理、发布的系统，大家可以下来搭建尝试。欢迎交流。
相关资料 http://zh.wikipedia.org/wiki/BitTorrent
]]></description>
			<content:encoded><![CDATA[<p>穷人，就得想穷人的办法，带宽被坑，严重缩水，为了分享大量资源，最终决定使用bt发布一些大资源。</p>
<p>网上找了很多BitTorrent架设btserver的教程，不是版本不对，就是安装复杂，所以，我找了个比较老的版本，一次装上调通。</p>
<p>我使用了BitTorrent-3.9.1，官方下载地址为 http://download.bittorrent.com/dl/archive/BitTorrent-3.9.1.tar.gz</p>
<p>防止墙，我传到本地 <a href='http://www.sunboyu.cn/upfiles/2009/06/bittorrent-391tar.gz'>bittorrent-3.9.1.tar.gz</a></p>
<p>首先你服务器要预装python，centos4.7预装python2.3，我预留，但服务器环境python使用了2.5版，2.3不能删，yum对版本依赖性比较强，还得预留。</p>
<p>解压 BitTorrent-3.9.1.tar.gz 后进入文件夹，按照说明进行安装：</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">python setup.py install</li></ol></div>
<p>即可安装。当然中间会遇到各种问题，大部分是关于python版本或者依赖的，错误可以跟帖发一下，一起解决。</p>
<p>好了，首先启动服务器：</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">python bttrack.py --port 6969 --dfile dfile.log</li></ol></div>
<p>其中port参数是服务的端口（一定记得调一下防火墙），dfile是日志</p>
<p>然后打开 http://ip:6969/  如果显示</p>
<p>BitTorrent download info</p>
<p>    * tracker version: 3.9.1<br />
    * server time: 2009-06-09 05:12 UTC</p>
<p>则证明服务启动成功。</p>
<p>下面创建一个种子文件</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">btmaketorrent.py http://bt.sunboyu.cn:6969/announce /root/soft/xmlrpc-epi-0.54.tar.gz</li></ol></div>
<p>这样，就针对 /root/soft/xmlrpc-epi-0.54.tar.gz 文件创建了一个种子文件，使用的track地址是 http://bt.sunboyu.cn:6969<br />
生成的种子位置，是这样:如果针对一个文件，则在文件同一文件夹下，如果针对文件夹，则在文件夹同级目录。</p>
<p>然后发布一个种子（很多人可能对种子这个概念不了解，可以查看资料，关于bt协议的）</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">btdownloadheadless.py /root/soft/xmlrpc-epi-0.54.tar.gz.torrent --save_as /root/soft/xmlrpc-epi-0.54.tar.gz</li></ol></div>
<p>发布种子有很多参数要限制，可以看命令具体参数，比如占用的端口跟限速等。</p>
<p>我测试了一下，linux发布的文件，就可以下载了。这只是服务器建立的阶段，要管理，还得写好多管理脚本，否则文件多的话，手工可受不了。</p>
<p>另外还有好多的开源web监控、管理、发布的系统，大家可以下来搭建尝试。欢迎交流。</p>
<p>相关资料 http://zh.wikipedia.org/wiki/BitTorrent</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/06/09/centos47%ef%bc%88linux%ef%bc%89%e4%b8%8b%e6%9e%b6%e8%ae%bebt%e6%9c%8d%e5%8a%a1%e5%99%a8.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>Linux下APACHE MYSQL PHP FCgid Suexec 配置文档V1.0</title>
		<link>http://www.sunboyu.cn/2009/05/22/linux%e4%b8%8bapache-mysql-php-fcgid-suexec-%e9%85%8d%e7%bd%ae%e6%96%87%e6%a1%a3v10.shtml</link>
		<comments>http://www.sunboyu.cn/2009/05/22/linux%e4%b8%8bapache-mysql-php-fcgid-suexec-%e9%85%8d%e7%bd%ae%e6%96%87%e6%a1%a3v10.shtml#comments</comments>
		<pubDate>Fri, 22 May 2009 03:14:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[APACHE]]></category>

		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[MYSQL]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[centos]]></category>

		<category><![CDATA[LAMP]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=716</guid>
		<description><![CDATA[文档版本：V1.0
启动撰写时间: 2009年05月20日
目的：全面详细介绍LAMP fastcgi方式配置细节,基于之前的自动配置脚本，目的是把更多的细节转达给大家。
需要软件源码：
CentOS4.7
http://centos.ustc.edu.cn/centos/4.7/isos/i386/CentOS-4.7.ServerCD-i386.iso
http://centos.ustc.edu.cn/centos/4.7/isos/x86_64/CentOS-4.7.ServerCD-x86_64.iso
Apache-2.2.9
http://archive.apache.org/dist/httpd/httpd-2.2.9.tar.gz
MYSQL-5.2.6
http://downloads.mysql.com/archives/mysql-5.0/mysql-5.0.22.tar.gz
PHP-5.2.6
http://museum.php.net/php5/php-5.2.6.tar.gz
FCGID
http://ncu.dl.sourceforge.net/sourceforge/mod-fcgid/mod_fcgid.2.2.tgz
安装：
第一步：Linux系统安装,同时可以参照我原来的文档
http://www.sunboyu.cn/2008/06/13/centos5%E5%AE%89%E8%A3%85%E6%8C%87%E5%8D%97%EF%BC%88%E7%AE%80%E5%8D%95%E7%AF%87%EF%BC%89.shtml

视频。我按照最小化进行安装。最后ping百度不通，是因为没有重启，重启后是正常的。从过程可疑看出，我用的vmware进行安装，所以，要根据你实际的网络情况进行调整配置。
Linux Centos 4.7 安装视频（下载）(关闭)

第二步：系统更新，组件安装。
首先更新一下yum源，具体查看这篇日志 http://www.sunboyu.cn/2009/01/07/centos4%E5%88%9D%E5%A7%8B%E5%8C%96%E7%9A%84%E4%B8%80%E4%BA%9B%E8%84%9A%E6%9C%AC.shtml
升级一下系统：
yum upgrade
安装一些必要的组件：
yum install gcc gcc-c++ gcc4-c++ autoconf gd gd-devel libxml2 libxml2-devel zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel expat expat-devel sqlite sqlite-devel png-devel jpeg-devel libtool libjpeg* libpng* freetype-devel
安装MYSQL-5.0.22
解压mysql
#tar -zxvf mysql-5.0.22.tar.gz
#cd cd mysql-5.0.22
#groupadd mysql
#useradd -g mysql mysql
#./configure &#8211;prefix=/opt/mysql-5.0.22 [...]]]></description>
			<content:encoded><![CDATA[<p>文档版本：V1.0</p>
<p>启动撰写时间: 2009年05月20日</p>
<p>目的：全面详细介绍LAMP fastcgi方式配置细节,基于之前的自动配置脚本，目的是把更多的细节转达给大家。</p>
<p>需要软件源码：</p>
<p>CentOS4.7</p>
<p>http://centos.ustc.edu.cn/centos/4.7/isos/i386/CentOS-4.7.ServerCD-i386.iso</p>
<p>http://centos.ustc.edu.cn/centos/4.7/isos/x86_64/CentOS-4.7.ServerCD-x86_64.iso</p>
<p>Apache-2.2.9</p>
<p>http://archive.apache.org/dist/httpd/httpd-2.2.9.tar.gz</p>
<p>MYSQL-5.2.6</p>
<p>http://downloads.mysql.com/archives/mysql-5.0/mysql-5.0.22.tar.gz</p>
<p>PHP-5.2.6</p>
<p>http://museum.php.net/php5/php-5.2.6.tar.gz</p>
<p>FCGID</p>
<p>http://ncu.dl.sourceforge.net/sourceforge/mod-fcgid/mod_fcgid.2.2.tgz</p>
<p>安装：</p>
<p>第一步：Linux系统安装,同时可以参照我原来的文档</p>
<p>http://www.sunboyu.cn/2008/06/13/centos5%E5%AE%89%E8%A3%85%E6%8C%87%E5%8D%97%EF%BC%88%E7%AE%80%E5%8D%95%E7%AF%87%EF%BC%89.shtml</p>
<p><span id="more-716"></span></p>
<p>视频。我按照最小化进行安装。最后ping百度不通，是因为没有重启，重启后是正常的。从过程可疑看出，我用的vmware进行安装，所以，要根据你实际的网络情况进行调整配置。</p>
<p><a href="http://www.sunboyu.cn/upfiles/v/lamp.avi">Linux Centos 4.7 安装视频（下载）</a>(关闭)</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="353" height="291" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://player.youku.com/player.php/sid/XMTExMTU3NzE2/v.swf" /><embed type="application/x-shockwave-flash" width="353" height="291" src="http://player.youku.com/player.php/sid/XMTExMTU3NzE2/v.swf"></embed></object></p>
<p>第二步：系统更新，组件安装。</p>
<p>首先更新一下yum源，具体查看这篇日志 http://www.sunboyu.cn/2009/01/07/centos4%E5%88%9D%E5%A7%8B%E5%8C%96%E7%9A%84%E4%B8%80%E4%BA%9B%E8%84%9A%E6%9C%AC.shtml</p>
<p>升级一下系统：</p>
<p>yum upgrade</p>
<p>安装一些必要的组件：</p>
<p>yum install gcc gcc-c++ gcc4-c++ autoconf gd gd-devel libxml2 libxml2-devel zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel expat expat-devel sqlite sqlite-devel png-devel jpeg-devel libtool libjpeg* libpng* freetype-devel</p>
<p>安装MYSQL-5.0.22</p>
<p>解压mysql</p>
<p>#tar -zxvf mysql-5.0.22.tar.gz</p>
<p>#cd cd mysql-5.0.22</p>
<p>#groupadd mysql</p>
<p>#useradd -g mysql mysql</p>
<p>#./configure &#8211;prefix=/opt/mysql-5.0.22 \<br />
&#8211;without-debug \<br />
&#8211;enable-thread-safe-client \<br />
&#8211;with-client-ldflags=-all-static \<br />
&#8211;with-mysqld-ldflags=-all-static \<br />
&#8211;enable-local-infile \<br />
&#8211;enable-largefile \<br />
&#8211;with-charset=utf8 \<br />
&#8211;with-collation=utf8_unicode_ci \<br />
&#8211;with-extra-charsets=complex \<br />
&#8211;with-pic \<br />
&#8211;with-mysqld-libs \<br />
&#8211;with-comment \<br />
&#8211;with-query-cache \<br />
&#8211;with-bench \<br />
&#8211;with-big-tables \<br />
&#8211;with-innodb \<br />
&#8211;with-mysqld-use=mysql</p>
<p>#make</p>
<p>#make install</p>
<p>#cp ./support-files/my-medium.cnf /etc/my.cnf</p>
<p>#cp ./support-files/mysql.server /etc/init.d/mysqld</p>
<p>#chmod 755 /etc/init.d/mysqld</p>
<p>#/opt/mysql-5.0.22/bin/mysql_install_db &#8211;user=mysql &amp;</p>
<p>#echo &#8220;/opt/mysql-5.0.22/bin/mysqld_safe &#8211;user=mysql &amp;&#8221;&gt;&gt;/etc/rc.local</p>
<p>#service mysqld start</p>
<p>#/opt/mysql-5.0.22/bin/mysqladmin -u root password &#8216;123456&#8242;</p>
<p>#cd ..</p>
<p>安装APACHE</p>
<p>#groupadd apache</p>
<p>#useradd -g apache apache</p>
<p>#tar -zxvf httpd-2.2.9.tar.gz</p>
<p>#cd httpd-2.2.9</p>
<p>#./configure &#8211;prefix=/opt/httpd-2.2.9 \<br />
&#8211;enable-dav \<br />
&#8211;enable-dav-fs \<br />
&#8211;enable-modules=all \<br />
&#8211;enable-mods-shared=all \<br />
&#8211;disable-auth-basic \<br />
&#8211;enable-include \<br />
&#8211;enable-substitute \<br />
&#8211;enable-authz-dbm \<br />
&#8211;enable-log-config \<br />
&#8211;enable-headers \<br />
&#8211;enable-setenvif \<br />
&#8211;with-ssl \<br />
&#8211;enable-static-ab \<br />
&#8211;enable-http \<br />
&#8211;enable-mime \<br />
&#8211;enable-status \<br />
&#8211;enable-isapi \<br />
&#8211;enable-imagemap \<br />
&#8211;enable-actions \<br />
&#8211;enable-speling \<br />
&#8211;enable-userdir \<br />
&#8211;enable-alias \<br />
&#8211;enable-vhost-alias \<br />
&#8211;enable-dir \<br />
&#8211;enable-rewrite \<br />
&#8211;enable-dumpio \<br />
&#8211;enable-echo \<br />
&#8211;enable-so \<br />
&#8211;enable-example \<br />
&#8211;enable-case-filter \<br />
&#8211;enable-substitute \<br />
&#8211;enable-log-config \<br />
&#8211;enable-logio \<br />
&#8211;enable-env \<br />
&#8211;with-mpm=worker \<br />
&#8211;with-included-apr \<br />
&#8211;with-apr \<br />
&#8211;with-apr-util \<br />
&#8211;with-z \<br />
&#8211;enable-proxy \<br />
&#8211;enable-proxy-connect \<br />
&#8211;enable-proxy-ftp \<br />
&#8211;enable-proxy-http \<br />
&#8211;enable-proxy-ajp \<br />
&#8211;enable-proxy-balancer \<br />
&#8211;enable-suexec \<br />
&#8211;with-suexec-caller=apache \<br />
&#8211;with-suexec-userdir=www \<br />
&#8211;with-suexec-docroot=/home \<br />
&#8211;with-suexec-uidmin=100 \<br />
&#8211;with-suexec-gidmin=100 \<br />
&#8211;with-suexec-logfile=/var/log/suexec_log</p>
<p>#make</p>
<p>#make install</p>
<p>#ln -s /opt/httpd-2.2.9/bin/apachectl /etc/init.d/httpd</p>
<p>#cd ..</p>
<p>修改apache配置文件 /opt/httpd-2.2.9/conf/httpd.conf</p>
<p>找到</p>
<p>User daemon<br />
Group daemon</p>
<p>修改为</p>
<p>User apache<br />
Group apache</p>
<p>安装 fcgid</p>
<p>#tar -zxvf mod_fcgid.2.2.tgz</p>
<p>#cd mod_fcgid.2.2</p>
<p>修改Makefile</p>
<p>top_dir = /usr/local/apache2 为 top_dir = /opt/httpd-2.2.9</p>
<p>#make</p>
<p>#make install</p>
<p>#cd ..</p>
<p>修改apache配置文件 httpd.conf</p>
<p>增加 LoadModule fcgid_module modules/mod_fcgid.so</p>
<p>安装PHP，记得增加cgi支持</p>
<p>#tar -zxvf php-5.2.6.tar.gz</p>
<p>#cd php-5.2.6</p>
<p>#./configure &#8211;prefix=/opt/php-5.2.6 &#8211;with-libxml-dir &#8211;enable-cli &#8211;enable-cgi &#8211;enable-fastcgi &#8211;enable-bcmath &#8211;enable-force-cgi-redirect &#8211;enable-discard-path &#8211;enable-path-info-check &#8211;with-openssl &#8211;with-pcre-regex &#8211;enable-calendar &#8211;enable-dom &#8211;enable-ftp &#8211;with-openssl-dir=/usr/local/ssl &#8211;enable-gd-jis-conv &#8211;enable-hash &#8211;with-iconv &#8211;enable-json &#8211;enable-mbstring &#8211;enable-mbregex &#8211;enable-pdo &#8211;enable-posix &#8211;enable-libxml &#8211;enable-simplexml &#8211;with-sqlite &#8211;enable-tokenizer &#8211;enable-xmlreader &#8211;enable-xmlwriter &#8211;enable-sockets &#8211;with-zlib &#8211;with-freetype-dir &#8211;with-gd &#8211;with-jpeg-dir=/usr/lib &#8211;with-png-dir=/usr/lib &#8211;with-mime-magic &#8211;with-mysql=/opt/mysql-5.0.22 &#8211;with-zlib-dir=/usr/lib/libz.so &#8211;with-pdo-mysql=/opt/mysql-5.0.22 &#8211;with-pdo-sqlite &#8211;enable-posix &#8211;enable-soap</p>
<p>#make</p>
<p>#make install</p>
<p>修改apache配置文件httpd.conf</p>
<p>找到</p>
<p># Virtual hosts<br />
#Include conf/extra/httpd-vhosts.conf</p>
<p>修改为</p>
<p># Virtual hosts<br />
Include conf/extra/httpd-vhosts.conf</p>
<p>修改apache配置文件 conf/extra/httpd-vhosts.conf</p>
<p>删除所有的虚拟主机</p>
<p>现在配置虚拟主机：</p>
<p>所有虚拟主机的组为 vhost</p>
<p>增加一个用户名为sunboyu的虚拟主机</p>
<p>#groupadd vhost</p>
<p>#useradd -g vhost sunboyu</p>
<p>用户主目录默认为 /home/sunboyu</p>
<p>增加两个目录</p>
<p>#mkdir /home/sunboyu/www</p>
<p>#mkdir /home/sunboyu/logs</p>
<p>增加虚拟主机配置文件</p>
<p>SuexecUserGroup sunboyu vhost<br />
ServerAdmin sunboyu@gmail.com<br />
DocumentRoot &#8220;/home/sunboyu/www&#8221;<br />
ServerName 192.168.0.4<br />
ServerAlias sunboyu.cn<br />
ErrorLog &#8220;/home/sunboyu/logs/error_log&#8221;<br />
CustomLog &#8220;|/opt/httpd-2.2.9/bin/rotatelogs /home/sunboyu/logs/%Y_%m_%d_log 86400 +480&#8243; common</p>
<p>AddHandler fcgid-script .php<br />
#AddHandler cgi-script .pl .cgi<br />
FCGIWrapper /home/sunboyu/php-cgi .php<br />
Options ExecCGI FollowSymLinks<br />
AllowOverride all<br />
Order deny,allow<br />
Allow from all</p>
<p>创建文件 /home/sunboyu/php-cgi 文件内容为</p>
<p>#!/bin/sh<br />
export PHPRC=/home/sunboyu<br />
export PHP_FCGI_CHILDREN=4<br />
export PHP_FCGI_MAX_REQUESTS=5000<br />
exec /opt/php-5.2.6/bin/php-cgi &#8220;$@&#8221;</p>
<p>#chmod 755 -R /home/sunboyu</p>
<p>#chown sunboyu:vhost -R /home/sunboyu</p>
<p>配置到现在，重启apache</p>
<p>#service httpd restart</p>
<p>在虚拟目录根下 /home/sunboyu/www 下写文件 info.php 内容为 phpinfo() 修改权限为755 用户组为 sunboyu:vhost</p>
<p>现在访问应该是phpinfo的信息。</p>
<p>在写这篇文档的时候，基本是按照数续依次安装。</p>
<p>如果有问题，希望帮忙，请提前修改你服务器root密码，我们可以一起调试。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/05/22/linux%e4%b8%8bapache-mysql-php-fcgid-suexec-%e9%85%8d%e7%bd%ae%e6%96%87%e6%a1%a3v10.shtml/feed</wfw:commentRss>
<enclosure url="http://www.sunboyu.cn/upfiles/v/lamp.avi" length="17880876" type="video/x-msvideo" />
		</item>
		<item>
		<title>做开源的虚拟主机管理系统</title>
		<link>http://www.sunboyu.cn/2009/05/15/%e5%81%9a%e5%bc%80%e6%ba%90%e7%9a%84%e8%99%9a%e6%8b%9f%e4%b8%bb%e6%9c%ba%e7%ae%a1%e7%90%86%e7%b3%bb%e7%bb%9f.shtml</link>
		<comments>http://www.sunboyu.cn/2009/05/15/%e5%81%9a%e5%bc%80%e6%ba%90%e7%9a%84%e8%99%9a%e6%8b%9f%e4%b8%bb%e6%9c%ba%e7%ae%a1%e7%90%86%e7%b3%bb%e7%bb%9f.shtml#comments</comments>
		<pubDate>Thu, 14 May 2009 21:47:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[虚拟主机管理]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=707</guid>
		<description><![CDATA[经过痛苦的削减，我把我预想中的虚拟主机管理系统功能裁到了最小 － 标准的单机lamp虚拟主机管理系统。
这个过程是很痛苦的。在软件设计的时候，我参考了好多成型的虚拟主机管理系统，包括蓝芒，webmin，还有德国等几个虚拟主机管理。不过在做的过程中发现了各自的优缺点，做了取并集综合的方法，整理出一个无比强大的功能设计文档。另外，根据国情，设计了完善的业务流程和各种接口。
不过在做的过程才发现，庞大的系统我根本不可能去实现。另外在做的时候的确卡在了一些技术细节上，python的使用毕竟不如php熟练，另外socket通讯在不同语言上有很多细节的区别，还得一一去测试突破。
基于以上原因，我把设计文档一再精简，到了目前仅适合我使用的程度：
1、开设虚拟主机，mysql数据库，并开ftp帐号。
2、用户可以修改mysql数据库密码。
3、用户可以修改ftp帐号密码。
如此以来，我项目可以继续进行了。因为足够简单。另外之前的折腾并不是白做，因为好多问题悬在了心中。因为之前的鸿鹄大志，导致我现在设计的结构可扩展性比较强，程序功能模块也都进行了合理规划。
希望在半个月后能出第一版程序，届时会开源公测。 希望对此有兴趣的同学加入我们（其实是我）。
]]></description>
			<content:encoded><![CDATA[<p>经过痛苦的削减，我把我预想中的虚拟主机管理系统功能裁到了最小 － 标准的单机lamp虚拟主机管理系统。</p>
<p>这个过程是很痛苦的。在软件设计的时候，我参考了好多成型的虚拟主机管理系统，包括蓝芒，webmin，还有德国等几个虚拟主机管理。不过在做的过程中发现了各自的优缺点，做了取并集综合的方法，整理出一个无比强大的功能设计文档。另外，根据国情，设计了完善的业务流程和各种接口。</p>
<p>不过在做的过程才发现，庞大的系统我根本不可能去实现。另外在做的时候的确卡在了一些技术细节上，python的使用毕竟不如php熟练，另外socket通讯在不同语言上有很多细节的区别，还得一一去测试突破。</p>
<p>基于以上原因，我把设计文档一再精简，到了目前仅适合我使用的程度：</p>
<p>1、开设虚拟主机，mysql数据库，并开ftp帐号。</p>
<p>2、用户可以修改mysql数据库密码。</p>
<p>3、用户可以修改ftp帐号密码。</p>
<p>如此以来，我项目可以继续进行了。因为足够简单。另外之前的折腾并不是白做，因为好多问题悬在了心中。因为之前的鸿鹄大志，导致我现在设计的结构可扩展性比较强，程序功能模块也都进行了合理规划。</p>
<p>希望在半个月后能出第一版程序，届时会开源公测。 希望对此有兴趣的同学加入我们（其实是我）。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/05/15/%e5%81%9a%e5%bc%80%e6%ba%90%e7%9a%84%e8%99%9a%e6%8b%9f%e4%b8%bb%e6%9c%ba%e7%ae%a1%e7%90%86%e7%b3%bb%e7%bb%9f.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>SVN两个小命令</title>
		<link>http://www.sunboyu.cn/2009/04/30/svn%e4%b8%a4%e4%b8%aa%e5%b0%8f%e5%91%bd%e4%bb%a4.shtml</link>
		<comments>http://www.sunboyu.cn/2009/04/30/svn%e4%b8%a4%e4%b8%aa%e5%b0%8f%e5%91%bd%e4%bb%a4.shtml#comments</comments>
		<pubDate>Wed, 29 Apr 2009 17:04:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[svn]]></category>

		<category><![CDATA[创建]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=678</guid>
		<description><![CDATA[./svnadmin create /home/sunboyu/svndata/bj1998
./svnserve -d &#8211;listen-port 端口号 -r /home/sunboyu/svndata/
 /var/opt/subversion-1.4.3/bin/svn checkout  svn://localhost:20002/tools ./ &#8211;username sun &#8211;password sun
]]></description>
			<content:encoded><![CDATA[<p>./svnadmin create /home/sunboyu/svndata/bj1998</p>
<p>./svnserve -d &#8211;listen-port 端口号 -r /home/sunboyu/svndata/</p>
<p> /var/opt/subversion-1.4.3/bin/svn checkout  svn://localhost:20002/tools ./ &#8211;username sun &#8211;password sun</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/04/30/svn%e4%b8%a4%e4%b8%aa%e5%b0%8f%e5%91%bd%e4%bb%a4.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>python2.5+MySQLdb1.2.2安装</title>
		<link>http://www.sunboyu.cn/2009/04/22/python25mysqldb122%e5%ae%89%e8%a3%85.shtml</link>
		<comments>http://www.sunboyu.cn/2009/04/22/python25mysqldb122%e5%ae%89%e8%a3%85.shtml#comments</comments>
		<pubDate>Tue, 21 Apr 2009 16:04:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[Python]]></category>

		<category><![CDATA[MySQLdb]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=662</guid>
		<description><![CDATA[最近比较喜欢用python写一些shell，又因为要跟mysql交互，所以安装python2.5＋MySQLdb1.2.2。
选择python而没有选择perl，c之类，是因为python语法相对简单，适合我。其实php也可以，但linux默认安装python并大量使用，而并不默认安装PHP。
在安装过程中遇到很多问题，暂不罗列，google是半万能的，多尝试。
使用这两个版本，是因为在编译过程中的问题，逼我仔细阅读了产品稳当，发现版本依赖性很强，最终选择的这两个。
python编译很简单 ./configure &#8211;prefix=/*****  就OK了。
MySQLdb的安装也很简单,但首先要修改site.cfg的参数，其中threadsafe和mysql_config的值要根据情况修改。
python setup.py build
（如果必要，中间运行这个  ln -s /opt/mysql-5.0.22/lib/libmysqlclient.a ./build/lib.linux-x86_64-2.4/_mysql.so 路径自己调整）
python setup.py install
]]></description>
			<content:encoded><![CDATA[<p>最近比较喜欢用python写一些shell，又因为要跟mysql交互，所以安装python2.5＋MySQLdb1.2.2。</p>
<p>选择python而没有选择perl，c之类，是因为python语法相对简单，适合我。其实php也可以，但linux默认安装python并大量使用，而并不默认安装PHP。</p>
<p>在安装过程中遇到很多问题，暂不罗列，google是半万能的，多尝试。</p>
<p>使用这两个版本，是因为在编译过程中的问题，逼我仔细阅读了产品稳当，发现版本依赖性很强，最终选择的这两个。</p>
<p>python编译很简单 ./configure &#8211;prefix=/*****  就OK了。</p>
<p>MySQLdb的安装也很简单,但首先要修改site.cfg的参数，其中threadsafe和mysql_config的值要根据情况修改。</p>
<p>python setup.py build<br />
（如果必要，中间运行这个  ln -s /opt/mysql-5.0.22/lib/libmysqlclient.a ./build/lib.linux-x86_64-2.4/_mysql.so 路径自己调整）<br />
python setup.py install</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/04/22/python25mysqldb122%e5%ae%89%e8%a3%85.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>iftop来查看linux的即时流量</title>
		<link>http://www.sunboyu.cn/2009/04/18/iftop%e6%9d%a5%e6%9f%a5%e7%9c%8blinux%e7%9a%84%e5%8d%b3%e6%97%b6%e6%b5%81%e9%87%8f.shtml</link>
		<comments>http://www.sunboyu.cn/2009/04/18/iftop%e6%9d%a5%e6%9f%a5%e7%9c%8blinux%e7%9a%84%e5%8d%b3%e6%97%b6%e6%b5%81%e9%87%8f.shtml#comments</comments>
		<pubDate>Sat, 18 Apr 2009 00:59:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[iftop]]></category>

		<category><![CDATA[流量]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=658</guid>
		<description><![CDATA[http://ex-parrot.com/~pdw/iftop/download/?D=A
我也就纳闷，直接make &#038;&#038; make install就好了。
如此简单的东西，iftop就可以查看了。
yum install *pcap*
]]></description>
			<content:encoded><![CDATA[<p>http://ex-parrot.com/~pdw/iftop/download/?D=A</p>
<p>我也就纳闷，直接make &#038;&#038; make install就好了。</p>
<p>如此简单的东西，iftop就可以查看了。</p>
<p>yum install *pcap*</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/04/18/iftop%e6%9d%a5%e6%9f%a5%e7%9c%8blinux%e7%9a%84%e5%8d%b3%e6%97%b6%e6%b5%81%e9%87%8f.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>话说备份</title>
		<link>http://www.sunboyu.cn/2009/04/18/%e8%af%9d%e8%af%b4%e5%a4%87%e4%bb%bd.shtml</link>
		<comments>http://www.sunboyu.cn/2009/04/18/%e8%af%9d%e8%af%b4%e5%a4%87%e4%bb%bd.shtml#comments</comments>
		<pubDate>Sat, 18 Apr 2009 00:39:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[灾难备份]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=654</guid>
		<description><![CDATA[最近服务器down了几次，频繁装了几次系统，可谓筋疲力尽，最后一次面对IBM的机器，对柜发誓：机器再down，这辈子不摸服务器。
话是这么说，服务真down了还的去管。
不过管之前，有些臭事还是要做－灾难备份。
首先是什么需要备份：数据库当然要备份，文件当然要备份。貌似所有的企业都在备份这些。
熟悉windows2003的网管都知道，2003提供了方便的配置文件备份，这个貌似是linux所没有的。打上标记。
用户需要备份么，我指linux系统帐号。备份一下吧，如果你有依赖系统账户的程序。
应用软件的配置文件是否要备份？如果你的配置很专业复杂个性，备份一下吧，省得都在黑白屏上VI，我双飞燕的键盘不好使，不想多敲几个字母。
源码的编译参数需要备份么？我有AMP自动安装脚本，很好很强大！
最近的一个小目标：linux灾难备份的脚本。
下一个就是：linux灾难恢复的脚本。
]]></description>
			<content:encoded><![CDATA[<p>最近服务器down了几次，频繁装了几次系统，可谓筋疲力尽，最后一次面对IBM的机器，对柜发誓：机器再down，这辈子不摸服务器。</p>
<p>话是这么说，服务真down了还的去管。</p>
<p>不过管之前，有些臭事还是要做－灾难备份。</p>
<p>首先是什么需要备份：数据库当然要备份，文件当然要备份。貌似所有的企业都在备份这些。</p>
<p>熟悉windows2003的网管都知道，2003提供了方便的配置文件备份，这个貌似是linux所没有的。打上标记。</p>
<p>用户需要备份么，我指linux系统帐号。备份一下吧，如果你有依赖系统账户的程序。</p>
<p>应用软件的配置文件是否要备份？如果你的配置很专业复杂个性，备份一下吧，省得都在黑白屏上VI，我双飞燕的键盘不好使，不想多敲几个字母。</p>
<p>源码的编译参数需要备份么？我有AMP自动安装脚本，很好很强大！</p>
<p>最近的一个小目标：linux灾难备份的脚本。</p>
<p>下一个就是：linux灾难恢复的脚本。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/04/18/%e8%af%9d%e8%af%b4%e5%a4%87%e4%bb%bd.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>linux下杀死某用户的所有进程</title>
		<link>http://www.sunboyu.cn/2009/04/08/linux%e4%b8%8b%e6%9d%80%e6%ad%bb%e6%9f%90%e7%94%a8%e6%88%b7%e7%9a%84%e6%89%80%e6%9c%89%e8%bf%9b%e7%a8%8b.shtml</link>
		<comments>http://www.sunboyu.cn/2009/04/08/linux%e4%b8%8b%e6%9d%80%e6%ad%bb%e6%9f%90%e7%94%a8%e6%88%b7%e7%9a%84%e6%89%80%e6%9c%89%e8%bf%9b%e7%a8%8b.shtml#comments</comments>
		<pubDate>Wed, 08 Apr 2009 15:53:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=648</guid>
		<description><![CDATA[kill -9 $(ps -fu  &#124; awk &#8216;{ print $2 }&#8217;)
该死的桶桶，给你开了几百个php-cgi进程，把服务器搞死了！
]]></description>
			<content:encoded><![CDATA[<p>kill -9 $(ps -fu <username> | awk &#8216;{ print $2 }&#8217;)</p>
<p>该死的桶桶，给你开了几百个php-cgi进程，把服务器搞死了！</username></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/04/08/linux%e4%b8%8b%e6%9d%80%e6%ad%bb%e6%9f%90%e7%94%a8%e6%88%b7%e7%9a%84%e6%89%80%e6%9c%89%e8%bf%9b%e7%a8%8b.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>linux内存释放</title>
		<link>http://www.sunboyu.cn/2009/04/07/linux%e5%86%85%e5%ad%98%e9%87%8a%e6%94%be.shtml</link>
		<comments>http://www.sunboyu.cn/2009/04/07/linux%e5%86%85%e5%ad%98%e9%87%8a%e6%94%be.shtml#comments</comments>
		<pubDate>Tue, 07 Apr 2009 14:32:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[内存]]></category>

		<category><![CDATA[释放]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=646</guid>
		<description><![CDATA[echo 1 &#62; /proc/sys/vm/drop_caches; #释放页面缓存 
echo 2 &#62; /proc/sys/vm/drop_caches; #释放dentries和inodes
echo 3 &#62; /proc/sys/vm/drop_caches; #释放1＋2
]]></description>
			<content:encoded><![CDATA[<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">echo 1 &gt; /proc/sys/vm/drop_caches; #释放页面缓存 </li>
<li>echo 2 &gt; /proc/sys/vm/drop_caches; #释放dentries和inodes</li>
<li>echo 3 &gt; /proc/sys/vm/drop_caches; #释放1＋2</li></ol></div>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/04/07/linux%e5%86%85%e5%ad%98%e9%87%8a%e6%94%be.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>还是Nginx对抗负载的能力强</title>
		<link>http://www.sunboyu.cn/2009/04/07/%e8%bf%98%e6%98%afnginx%e5%af%b9%e6%8a%97%e8%b4%9f%e8%bd%bd%e7%9a%84%e8%83%bd%e5%8a%9b%e5%bc%ba.shtml</link>
		<comments>http://www.sunboyu.cn/2009/04/07/%e8%bf%98%e6%98%afnginx%e5%af%b9%e6%8a%97%e8%b4%9f%e8%bd%bd%e7%9a%84%e8%83%bd%e5%8a%9b%e5%bc%ba.shtml#comments</comments>
		<pubDate>Tue, 07 Apr 2009 06:45:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[APACHE]]></category>

		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[apache]]></category>

		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=640</guid>
		<description><![CDATA[编译了老半天的apache，又做了很多调整和优化，依然抗不住死机，其实负载也不是很大，但内存CPU就是出奇的高，无奈，装上nginx，负载一下子下来了。
顺便提一下，我PC级的服务器。
感谢  http://www.51fit.com/ 友情提供测试数据
计划重新部署apache，调整工作模式。
]]></description>
			<content:encoded><![CDATA[<p>编译了老半天的apache，又做了很多调整和优化，依然抗不住死机，其实负载也不是很大，但内存CPU就是出奇的高，无奈，装上nginx，负载一下子下来了。</p>
<p>顺便提一下，我PC级的服务器。</p>
<p>感谢  http://www.51fit.com/ 友情提供测试数据</p>
<p>计划重新部署apache，调整工作模式。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/04/07/%e8%bf%98%e6%98%afnginx%e5%af%b9%e6%8a%97%e8%b4%9f%e8%bd%bd%e7%9a%84%e8%83%bd%e5%8a%9b%e5%bc%ba.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>SVN自动提交那个钩子</title>
		<link>http://www.sunboyu.cn/2009/03/17/svn%e8%87%aa%e5%8a%a8%e6%8f%90%e4%ba%a4%e9%82%a3%e4%b8%aa%e9%92%a9%e5%ad%90.shtml</link>
		<comments>http://www.sunboyu.cn/2009/03/17/svn%e8%87%aa%e5%8a%a8%e6%8f%90%e4%ba%a4%e9%82%a3%e4%b8%aa%e9%92%a9%e5%ad%90.shtml#comments</comments>
		<pubDate>Tue, 17 Mar 2009 10:30:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=606</guid>
		<description><![CDATA[首先那个版本得检出一下 /opt/subversion-1.4.3/bin/svn checkout svn://svn.sunboyu.cn:**/python/sso /home/project/sso
export LANG=zh_CN.UTF-8&#160; &#160;#中文支持
REPOS=&#34;$1&#34;
REV=&#34;$2&#34;
SVN=/opt/subversion-1.4.3/bin/svn&#160; #svn的地址
DIR=/home/main&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;#目标地址
/opt/subversion-1.4.3/bin/svn update /home/main&#160; &#160; &#160; &#160;#执行
]]></description>
			<content:encoded><![CDATA[<p>首先那个版本得检出一下 /opt/subversion-1.4.3/bin/svn checkout svn://svn.sunboyu.cn:**/python/sso /home/project/sso</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">export LANG=zh_CN.UTF-8&nbsp; &nbsp;#中文支持</li>
<li>REPOS=&quot;$1&quot;</li>
<li>REV=&quot;$2&quot;</li>
<li>SVN=/opt/subversion-1.4.3/bin/svn&nbsp; #svn的地址</li>
<li>DIR=/home/main&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#目标地址</li>
<li>/opt/subversion-1.4.3/bin/svn update /home/main&nbsp; &nbsp; &nbsp; &nbsp;#执行</li></ol></div>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/03/17/svn%e8%87%aa%e5%8a%a8%e6%8f%90%e4%ba%a4%e9%82%a3%e4%b8%aa%e9%92%a9%e5%ad%90.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>AS4中jdk的配置问题</title>
		<link>http://www.sunboyu.cn/2009/02/24/as4%e4%b8%adjdk%e7%9a%84%e9%85%8d%e7%bd%ae%e9%97%ae%e9%a2%98.shtml</link>
		<comments>http://www.sunboyu.cn/2009/02/24/as4%e4%b8%adjdk%e7%9a%84%e9%85%8d%e7%bd%ae%e9%97%ae%e9%a2%98.shtml#comments</comments>
		<pubDate>Tue, 24 Feb 2009 06:10:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[as4]]></category>

		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=581</guid>
		<description><![CDATA[AS4中默认安装了jdk1.3.×
在安装jdk1.6.0后，设置了环境变量，可默认还是显示java1.3.×
后发现，在/usr/bin 下有java这个文件，默认关联的是1.3的，删除掉后，发现一切正常
]]></description>
			<content:encoded><![CDATA[<p>AS4中默认安装了jdk1.3.×<br />
在安装jdk1.6.0后，设置了环境变量，可默认还是显示java1.3.×<br />
后发现，在/usr/bin 下有java这个文件，默认关联的是1.3的，删除掉后，发现一切正常</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/02/24/as4%e4%b8%adjdk%e7%9a%84%e9%85%8d%e7%bd%ae%e9%97%ae%e9%a2%98.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>centos折腾记录</title>
		<link>http://www.sunboyu.cn/2009/02/10/centos%e6%8a%98%e8%85%be%e8%ae%b0%e5%bd%95.shtml</link>
		<comments>http://www.sunboyu.cn/2009/02/10/centos%e6%8a%98%e8%85%be%e8%ae%b0%e5%bd%95.shtml#comments</comments>
		<pubDate>Tue, 10 Feb 2009 03:47:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=561</guid>
		<description><![CDATA[安装gmone图形界面
yum &#8211;exclude=nautilus-sendto groupinstall gnome-desktop
安装vnc
yum install vnc
vncserver start
vi xstartup
#xterm -geometry 80&#215;24+10+10 -ls -title &#8220;$VNCDESKTOP Desktop&#8221; &#038;
gnome-session
就OK了
安装中文-得给不会命令行的大哥们用
yum groupinstall &#8220;Chinese Support&#8221;
另外编辑/etc/sysconfig/i18n成下面这个样子：
LANG=&#8221;zh_CN.GB18030&#8243;
SUPPORTED=&#8221;zh_CN.GB18030:zh_CN:zh:zh_TW.Big5:zh_TW:zh:en_US.iso885915:en_US:en&#8221;
SYSFONT=&#8221;lat0-sun16&#8243;
SYSFONTACM=&#8221;iso15&#8243;
reboot
另外，我想centos4.7直接yum成centos5.2，暂时不折腾
]]></description>
			<content:encoded><![CDATA[<p>安装gmone图形界面</p>
<p>yum &#8211;exclude=nautilus-sendto groupinstall gnome-desktop</p>
<p>安装vnc</p>
<p>yum install vnc</p>
<p>vncserver start</p>
<p>vi xstartup<br />
#xterm -geometry 80&#215;24+10+10 -ls -title &#8220;$VNCDESKTOP Desktop&#8221; &#038;<br />
gnome-session</p>
<p>就OK了</p>
<p>安装中文-得给不会命令行的大哥们用</p>
<p>yum groupinstall &#8220;Chinese Support&#8221;</p>
<p>另外编辑/etc/sysconfig/i18n成下面这个样子：<br />
LANG=&#8221;zh_CN.GB18030&#8243;<br />
SUPPORTED=&#8221;zh_CN.GB18030:zh_CN:zh:zh_TW.Big5:zh_TW:zh:en_US.iso885915:en_US:en&#8221;<br />
SYSFONT=&#8221;lat0-sun16&#8243;<br />
SYSFONTACM=&#8221;iso15&#8243;</p>
<p>reboot</p>
<p>另外，我想centos4.7直接yum成centos5.2，暂时不折腾</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/02/10/centos%e6%8a%98%e8%85%be%e8%ae%b0%e5%bd%95.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>nagios学习笔记－安装篇</title>
		<link>http://www.sunboyu.cn/2009/02/04/nagios%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0%ef%bc%8d%e5%ae%89%e8%a3%85%e7%af%87.shtml</link>
		<comments>http://www.sunboyu.cn/2009/02/04/nagios%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0%ef%bc%8d%e5%ae%89%e8%a3%85%e7%af%87.shtml#comments</comments>
		<pubDate>Wed, 04 Feb 2009 09:49:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[nagios]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=554</guid>
		<description><![CDATA[服务器和网络总搞的人疲惫，有不少商用的服务器监视工具，但价格都太贵，自己写，太费劲，而且要监控的服务也很多，不近要监控可用性，还要监控性能。
后在CU论坛看到nagios功能强大，尝试安装了一下。
首先到 http://www.nagios.org/ 下载 nagios-3.0.6.tar.gz  nagios-plugins-1.4.13.tar.gz  两个程序，两个必须安装，否则不工作。
nagios主程序安装非常简单，暂时没有看configure参数，直接加了个 &#8211;prefix就OK了。那个plugins也一样，但nagios主程序在configure &#8211;prefix &#038;&#038; make all &#038;&#038; make install 之后,还要运行 make install-commandmode &#038;&#038; make install-config &#038;&#038; make install-init &#038;&#038; make install-webconf  但是最后一个 make install-webconf 可能会报错，无法找到apache配置文件目录，手工拷贝 nagios.conf 到apache配置文件目录，在主配置文件引用就可以了。
这样安装就完成了，可以访问 localhost/nagios
但没有配置，无法完成监控报表的功能，因为刚学习，也没找到中文文档，待研究后继续……
]]></description>
			<content:encoded><![CDATA[<p>服务器和网络总搞的人疲惫，有不少商用的服务器监视工具，但价格都太贵，自己写，太费劲，而且要监控的服务也很多，不近要监控可用性，还要监控性能。</p>
<p>后在CU论坛看到nagios功能强大，尝试安装了一下。</p>
<p>首先到 http://www.nagios.org/ 下载 nagios-3.0.6.tar.gz  nagios-plugins-1.4.13.tar.gz  两个程序，两个必须安装，否则不工作。</p>
<p>nagios主程序安装非常简单，暂时没有看configure参数，直接加了个 &#8211;prefix就OK了。那个plugins也一样，但nagios主程序在configure &#8211;prefix &#038;&#038; make all &#038;&#038; make install 之后,还要运行 make install-commandmode &#038;&#038; make install-config &#038;&#038; make install-init &#038;&#038; make install-webconf  但是最后一个 make install-webconf 可能会报错，无法找到apache配置文件目录，手工拷贝 nagios.conf 到apache配置文件目录，在主配置文件引用就可以了。</p>
<p>这样安装就完成了，可以访问 localhost/nagios</p>
<p>但没有配置，无法完成监控报表的功能，因为刚学习，也没找到中文文档，待研究后继续……</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/02/04/nagios%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0%ef%bc%8d%e5%ae%89%e8%a3%85%e7%af%87.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>Linux时间同步大法</title>
		<link>http://www.sunboyu.cn/2009/02/01/linux%e6%97%b6%e9%97%b4%e5%90%8c%e6%ad%a5%e5%a4%a7%e6%b3%95.shtml</link>
		<comments>http://www.sunboyu.cn/2009/02/01/linux%e6%97%b6%e9%97%b4%e5%90%8c%e6%ad%a5%e5%a4%a7%e6%b3%95.shtml#comments</comments>
		<pubDate>Sun, 01 Feb 2009 04:11:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[rdate]]></category>

		<category><![CDATA[时间同步]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=546</guid>
		<description><![CDATA[linux时间不同步，很郁闷，装了个ntp之类的东西，还是不好使
其实使用rdate就可以，但死活不成功。
又考虑，时间协议也许不是走80端口，查看/etc/service 果然，service iptables stop, 重新运行
rdate -s time.nist.gov
果然同步成功。
本机设置为上海时间，一切OK。
]]></description>
			<content:encoded><![CDATA[<p>linux时间不同步，很郁闷，装了个ntp之类的东西，还是不好使</p>
<p>其实使用rdate就可以，但死活不成功。</p>
<p>又考虑，时间协议也许不是走80端口，查看/etc/service 果然，service iptables stop, 重新运行</p>
<p>rdate -s time.nist.gov</p>
<p>果然同步成功。</p>
<p>本机设置为上海时间，一切OK。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/02/01/linux%e6%97%b6%e9%97%b4%e5%90%8c%e6%ad%a5%e5%a4%a7%e6%b3%95.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>sunboyu-amp-fastcgi-suexec-v23-alpha</title>
		<link>http://www.sunboyu.cn/2009/01/21/sunboyu-amp-fastcgi-suexec-v23-alpha.shtml</link>
		<comments>http://www.sunboyu.cn/2009/01/21/sunboyu-amp-fastcgi-suexec-v23-alpha.shtml#comments</comments>
		<pubDate>Wed, 21 Jan 2009 03:10:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[amp]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=516</guid>
		<description><![CDATA[Linux下APACHE MYSQL PHP FCgid Suexec 自动安装脚本V2.3
1、补全了支持的字符集，默认为utf8
sunboyu-amp-fastcgi-suexec-v23-alpha
]]></description>
			<content:encoded><![CDATA[<p>Linux下APACHE MYSQL PHP FCgid Suexec 自动安装脚本V2.3</p>
<p>1、补全了支持的字符集，默认为utf8</p>
<p><a href='http://www.sunboyu.cn/upfiles/2009/01/sunboyu-amp-fastcgi-suexec-v23-alpha.txt'>sunboyu-amp-fastcgi-suexec-v23-alpha</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/01/21/sunboyu-amp-fastcgi-suexec-v23-alpha.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>倒霉的网管</title>
		<link>http://www.sunboyu.cn/2009/01/19/%e5%80%92%e9%9c%89%e7%9a%84%e7%bd%91%e7%ae%a1.shtml</link>
		<comments>http://www.sunboyu.cn/2009/01/19/%e5%80%92%e9%9c%89%e7%9a%84%e7%bd%91%e7%ae%a1.shtml#comments</comments>
		<pubDate>Mon, 19 Jan 2009 12:40:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[故障]]></category>

		<category><![CDATA[网管]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=507</guid>
		<description><![CDATA[ping的通，连不上]]></description>
			<content:encoded><![CDATA[<p>该死的网管，昨天就发现网络不正常，没注意，以为是机房不稳定，可这种状态持续到了今天。话说这状态非常诡异，可以ping通，很快，偶尔也能应用一些服务，httpd，ftp，ssh，但有时候任何服务都中断，只是ping的通。</p>
<p>但是如果ssh一直保持会话，突然中断后，ssh还能顺利跟服务器通讯。</p>
<p>这可难坏了我这个牛叉的系统工程师和一个CCIE级大哥，我又发挥流氓黑客的精神，彻底扫描了服务器端口和一些数据包，发现几个疑点：</p>
<p>1、服务器通讯正常的时候，所有端口的包数据都是正常的，是我自己服务的标志。</p>
<p>2、服务器通讯异常的时候，服务端口有变，并且出现异常数据。</p>
<p>疯狂google后发现，有这么几个可能性：</p>
<p>1、dell的网卡驱动没有装好，会产生MAC地址跳跃（mac地址都是写在芯片里的，汗！）。</p>
<p>2、ip地址被盗用了。</p>
<p>第一条已经排除，下载dell网卡驱动后，重装后也正常。问题依然存在。</p>
<p>第二，我跟那边网管要了个新的ip，一切正常。</p>
<p>比较一下两个服务器的几个协议的头,上边是我的，下边是异常的</p>
<p>1、ftp</p>
<p>我牛叉的Pure-FTPd,mysql动态控制的</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">220---------- 欢迎来到 Pure-FTPd ----------</li>
<li>220-您是第 1 个使用者，最多可达 50 个连接</li>
<li>220-现在本地时间是 15:21。服务器端口： 21。</li>
<li>220-这部主机也欢迎IPv6的连接</li>
<li>220 在 15 分钟内没有活动，您被会断线。</li></ol></div>
<p>啥玩意，还真没见过</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">220 211.99.3.121 pSOSystem FTP server (NTL386/1.0.4) ready.</li></ol></div>
<p>他的其他端口<br />
特征码出来了，CTerminalSocket，google一下原来是作voip电话的服务器，逮着了，回头砸他服务器去！</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">Connect</li>
<li>Remote Command:</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;MCMS VERSION 7.5.0.173&nbsp; &nbsp;Operating System : PSOS</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 19/01/09 15:32:40:590 N</li>
<li>:0000133853 T:0c610000 L:10 S:0585d800 CTerminalSocket</li>
<li>&nbsp;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;****************&nbsp; &nbsp;EXCEPTI</li>
<li>ON&nbsp; *****************</li></ol></div>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/01/19/%e5%80%92%e9%9c%89%e7%9a%84%e7%bd%91%e7%ae%a1.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>累……疯狂的配置</title>
		<link>http://www.sunboyu.cn/2009/01/18/%e7%b4%af%e2%80%a6%e2%80%a6%e7%96%af%e7%8b%82%e7%9a%84%e9%85%8d%e7%bd%ae.shtml</link>
		<comments>http://www.sunboyu.cn/2009/01/18/%e7%b4%af%e2%80%a6%e2%80%a6%e7%96%af%e7%8b%82%e7%9a%84%e9%85%8d%e7%bd%ae.shtml#comments</comments>
		<pubDate>Sun, 18 Jan 2009 14:16:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[centos]]></category>

		<category><![CDATA[dell]]></category>

		<category><![CDATA[优化]]></category>

		<category><![CDATA[精简]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=503</guid>
		<description><![CDATA[Dell1950终于上架了，又一个牛叉的系统，我把CentOS精简到了我能想象到的极致（当然跟gentoo还不能媲美），在AMP(apache,php,mysql)都启动空负载的状态下，内存占用降到了128M以下。
top - 16:54:16 up&#160; 3:42,&#160; 1 user,&#160; load average: 0.00, 0.00, 0.00
Tasks:&#160; 83 total,&#160; &#160;1 running,&#160; 82 sleeping,&#160; &#160;0 stopped,&#160; &#160;0 zombie
Cpu(s):&#160; 0.0% us,&#160; 0.0% sy,&#160; 0.0% ni, 99.9% id,&#160; 0.1% wa,&#160; 0.0% hi,&#160; 0.0% si
Mem:&#160; &#160;4042344k total,&#160; &#160;125040k used,&#160; 3917304k free,&#160; &#160; 11136k buffers
Swap:&#160; 6094840k total,&#160; &#160; &#160; &#160; 0k used,&#160; 6094840k free,&#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Dell1950终于上架了，又一个牛叉的系统，我把CentOS精简到了我能想象到的极致（当然跟gentoo还不能媲美），在AMP(apache,php,mysql)都启动空负载的状态下，内存占用降到了128M以下。</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">top - 16:54:16 up&nbsp; 3:42,&nbsp; 1 user,&nbsp; load average: 0.00, 0.00, 0.00</li>
<li>Tasks:&nbsp; 83 total,&nbsp; &nbsp;1 running,&nbsp; 82 sleeping,&nbsp; &nbsp;0 stopped,&nbsp; &nbsp;0 zombie</li>
<li>Cpu(s):&nbsp; 0.0% us,&nbsp; 0.0% sy,&nbsp; 0.0% ni, 99.9% id,&nbsp; 0.1% wa,&nbsp; 0.0% hi,&nbsp; 0.0% si</li>
<li>Mem:&nbsp; &nbsp;4042344k total,&nbsp; &nbsp;125040k used,&nbsp; 3917304k free,&nbsp; &nbsp; 11136k buffers</li>
<li>Swap:&nbsp; 6094840k total,&nbsp; &nbsp; &nbsp; &nbsp; 0k used,&nbsp; 6094840k free,&nbsp; &nbsp; 47004k cached</li></ol></div>
<p>一些内核级补丁没有打，估计了解这类漏洞入侵的人，我暂时也招架不住，现在只是为了服务器的稳定。apache＋php＋mysql＋ftp＋ssh之类的账户权限作了详细的统筹，对外服务权限尤其作了限制，尽量达到最优。PHP是用developer模式进行编译安装，没有考虑实际应用，只是把功能尽量多的增加（这些操作会稍微影响性能，但相对128M，是可以忽略的），但很重要的opcode缓冲加上了，Centos用最小安装，以来的一些组件和库分别安装，决不多余。尽量在硬盘基础占用上也降至最小。硬盘分区使用了LVM，偷懒了，虽然这样会有很大的问题，但手工分区还不是很熟悉，而且在管理存储上我功力还不够，以后进行改善。</p>
<p>硬盘情况如下：感觉还是大了点，回头清理一下缓存。</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">[root@localhost ~]# df</li>
<li>Filesystem&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1K-blocks&nbsp; &nbsp; &nbsp; Used Available Use% Mounted on</li>
<li>/dev/mapper/VolGroup00-LogVol00</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 134980848&nbsp; &nbsp;1214972 126909172&nbsp; &nbsp;1% /</li>
<li>/dev/sda1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;101086&nbsp; &nbsp; &nbsp;14864&nbsp; &nbsp; &nbsp;81003&nbsp; 16% /boot</li>
<li>none&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2021172&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0&nbsp; &nbsp;2021172&nbsp; &nbsp;0% /dev/shm</li></ol></div>
<p>很成功的系统，但管理软件我一直没功夫去写，待写完后就是一个完整的初始系统＋管理套件</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/01/18/%e7%b4%af%e2%80%a6%e2%80%a6%e7%96%af%e7%8b%82%e7%9a%84%e9%85%8d%e7%bd%ae.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>Dell1950安装Centos4.7 ServerCD</title>
		<link>http://www.sunboyu.cn/2009/01/18/dell1950%e5%ae%89%e8%a3%85centos47-servercd.shtml</link>
		<comments>http://www.sunboyu.cn/2009/01/18/dell1950%e5%ae%89%e8%a3%85centos47-servercd.shtml#comments</comments>
		<pubDate>Sun, 18 Jan 2009 03:11:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[centos]]></category>

		<category><![CDATA[centos4.7]]></category>

		<category><![CDATA[dell1950]]></category>

		<category><![CDATA[servercd]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=501</guid>
		<description><![CDATA[朋友弄来一台Dell1950，至强E5405，单颗CPU4核，4G内存，一块136Gsas硬盘，因原来的双CPU的机器利用率太差，好说歹说才降级改成单CPU。
原以为DELL对linux支持很好，可我的centos4.7servercd 并没有直接就能装上，估计是不认sas硬盘，没有继承sas硬盘的驱动，翻出机器自带的引导光盘，默认引导一遍，把驱动拷贝到硬盘上，可所支持的操作系统只有windows和redhat的as系统，我的CentosCD并不认，逼我重启，再用CentosCD引导，顺利安装。
这机器就是比我本本上的虚拟机快－－&#124;&#124;几乎是闪装系统，闪编译，而最大的瓶颈却是我家里1M的adsl带宽，因为我是从我 sunboyu.cn 的源里下载软件，其实当时应该配置成局域网源的，忘了，不过也就这样了，速度飞快，而且我那个脚本基本无人职守，跑上，我就喝茶去了……
顺便也写了本篇日志
]]></description>
			<content:encoded><![CDATA[<p>朋友弄来一台Dell1950，至强E5405，单颗CPU4核，4G内存，一块136Gsas硬盘，因原来的双CPU的机器利用率太差，好说歹说才降级改成单CPU。</p>
<p>原以为DELL对linux支持很好，可我的centos4.7servercd 并没有直接就能装上，估计是不认sas硬盘，没有继承sas硬盘的驱动，翻出机器自带的引导光盘，默认引导一遍，把驱动拷贝到硬盘上，可所支持的操作系统只有windows和redhat的as系统，我的CentosCD并不认，逼我重启，再用CentosCD引导，顺利安装。</p>
<p>这机器就是比我本本上的虚拟机快－－||几乎是闪装系统，闪编译，而最大的瓶颈却是我家里1M的adsl带宽，因为我是从我 sunboyu.cn 的源里下载软件，其实当时应该配置成局域网源的，忘了，不过也就这样了，速度飞快，而且我那个脚本基本无人职守，跑上，我就喝茶去了……</p>
<p>顺便也写了本篇日志</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/01/18/dell1950%e5%ae%89%e8%a3%85centos47-servercd.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>gentoo初体验</title>
		<link>http://www.sunboyu.cn/2009/01/17/gentoo%e5%88%9d%e4%bd%93%e9%aa%8c.shtml</link>
		<comments>http://www.sunboyu.cn/2009/01/17/gentoo%e5%88%9d%e4%bd%93%e9%aa%8c.shtml#comments</comments>
		<pubDate>Sat, 17 Jan 2009 06:37:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[GenToo]]></category>

		<category><![CDATA[gentoo]]></category>

		<category><![CDATA[安装]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=495</guid>
		<description><![CDATA[使用的是 install-x86-minimal-2008.0.iso 这张盘，在vmware6中进行安装。
初次安装异常辛苦，想起了刚买电脑装98那架势。自己格盘，配置文件系统，然后安装，然后％……※×……×（※（
反正很有乐趣。
底下是初次使用常用命令，打包收集一下
passwd  #修改root密码
net-setup eth0   #修改网卡信息
/etc/init.d/sshd start  #启动sshd服务  底下就可以用ssh登录了
磁盘分区，我习惯用lvm，虽说安全和管理上是偷懒的行为，不过方便么。
fdisk不好用，我用cfdisk，很OK。
创建文件系统的命令



文件系统
创建命令


ext2
mke2fs


ext3
mke2fs -j


reiserfs
mkreiserfs


xfs
mkfs.xfs


jfs
mkfs.jfs



创建swap分区  mkswap /dev/hda2
激活swap分区  swapon /dev/hda2
然后挂载文件，具体看手册  http://gentoo.linuxsir.org/doc/cn/handbook/hb_part1_chap5.html
以后按照手册，我基本建立起了这个系统，而且portage成功。
]]></description>
			<content:encoded><![CDATA[<p>使用的是 install-x86-minimal-2008.0.iso 这张盘，在vmware6中进行安装。</p>
<p>初次安装异常辛苦，想起了刚买电脑装98那架势。自己格盘，配置文件系统，然后安装，然后％……※×……×（※（</p>
<p>反正很有乐趣。</p>
<p>底下是初次使用常用命令，打包收集一下<br />
passwd  #修改root密码<br />
net-setup eth0   #修改网卡信息<br />
/etc/init.d/sshd start  #启动sshd服务  底下就可以用ssh登录了</p>
<p>磁盘分区，我习惯用lvm，虽说安全和管理上是偷懒的行为，不过方便么。<br />
fdisk不好用，我用cfdisk，很OK。</p>
<p>创建文件系统的命令</p>
<table border="0">
<tbody>
<tr>
<td bgcolor="#7a5ada"><strong>文件系统</strong></td>
<td bgcolor="#7a5ada"><strong>创建命令</strong></td>
</tr>
<tr>
<td bgcolor="#ddddff">ext2</td>
<td bgcolor="#ddddff"><span class="code">mke2fs</span></td>
</tr>
<tr>
<td bgcolor="#ddddff">ext3</td>
<td bgcolor="#ddddff"><span class="code">mke2fs -j</span></td>
</tr>
<tr>
<td bgcolor="#ddddff">reiserfs</td>
<td bgcolor="#ddddff"><span class="code">mkreiserfs</span></td>
</tr>
<tr>
<td bgcolor="#ddddff">xfs</td>
<td bgcolor="#ddddff"><span class="code">mkfs.xfs</span></td>
</tr>
<tr>
<td bgcolor="#ddddff">jfs</td>
<td bgcolor="#ddddff"><span class="code">mkfs.jfs</span></td>
</tr>
</tbody>
</table>
<p>创建swap分区  mkswap /dev/hda2</p>
<p>激活swap分区  swapon /dev/hda2</p>
<p>然后挂载文件，具体看手册  http://gentoo.linuxsir.org/doc/cn/handbook/hb_part1_chap5.html</p>
<p>以后按照手册，我基本建立起了这个系统，而且portage成功。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/01/17/gentoo%e5%88%9d%e4%bd%93%e9%aa%8c.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>服务器性能负载记录工具</title>
		<link>http://www.sunboyu.cn/2009/01/14/%e6%9c%8d%e5%8a%a1%e5%99%a8%e6%80%a7%e8%83%bd%e8%b4%9f%e8%bd%bd%e8%ae%b0%e5%bd%95%e5%b7%a5%e5%85%b7.shtml</link>
		<comments>http://www.sunboyu.cn/2009/01/14/%e6%9c%8d%e5%8a%a1%e5%99%a8%e6%80%a7%e8%83%bd%e8%b4%9f%e8%bd%bd%e8%ae%b0%e5%bd%95%e5%b7%a5%e5%85%b7.shtml#comments</comments>
		<pubDate>Wed, 14 Jan 2009 09:15:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[工具]]></category>

		<category><![CDATA[日志]]></category>

		<category><![CDATA[负载]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=486</guid>
		<description><![CDATA[服务器突然发生了崩溃，老板开始找我了。
找了半天居然没找到问题在哪里，一咬牙，写了个性能和负载的记录工具，再出事我可有记录了－,－&#124;&#124;
备注：只能在linux下用。
&#60; ?php
date_default_timezone_set('Asia/Shanghai');
define('SLEEPTIME',10);&#160; &#160; &#160; &#160;//10秒记录一次
$memfile&#160; = &#34;/proc/meminfo&#34;;
$loadfile = &#34;/proc/loadavg&#34;;
$logfile&#160; = sprintf(&#34;/var/www/html/log/%s.log&#34;,date('Y-m-d'));
while(1)
{
	$log = getload();
	$log .= getmem();
	$log .= mymem();
	$log .= &#34;\n\r&#34;.date(&#34;Y-m-d H:i:s&#34;);
	$log .= &#34;\n\r\n\r&#34;;
	$handle = fopen($logfile,'a');
	fwrite($handle,$log);
	fclose($handle);
	sleep(SLEEPTIME);
}
&#160;
function getload()&#160; &#160; &#160; //获得负载
{
	global $loadfile;
	return file_get_contents($loadfile);
}
function getmem()&#160; &#160; &#160; //获得内存占用
{
	global $memfile;
	$mem = file($memfile);
	return $mem[0];
}
function mymem()&#160; &#160; &#160; &#160;//程序本身内存占用
{
	$pid = getmypid();
	exec(&#34;ps -eo%mem,rss,pid &#124; grep $pid&#34;, $output);
&#160;&#160; &#160; &#160; &#160;$output = explode(&#34; &#34;, [...]]]></description>
			<content:encoded><![CDATA[<p>服务器突然发生了崩溃，老板开始找我了。</p>
<p>找了半天居然没找到问题在哪里，一咬牙，写了个性能和负载的记录工具，再出事我可有记录了－,－||</p>
<p>备注：只能在linux下用。</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">&lt; ?php</li>
<li>date_default_timezone_set('Asia/Shanghai');</li>
<li>define('SLEEPTIME',10);&nbsp; &nbsp; &nbsp; &nbsp;//10秒记录一次</li>
<li>$memfile&nbsp; = &quot;/proc/meminfo&quot;;</li>
<li>$loadfile = &quot;/proc/loadavg&quot;;</li>
<li>$logfile&nbsp; = sprintf(&quot;/var/www/html/log/%s.log&quot;,date('Y-m-d'));</li>
<li>while(1)</li>
<li>{</li>
<li>	$log = getload();</li>
<li>	$log .= getmem();</li>
<li>	$log .= mymem();</li>
<li>	$log .= &quot;\n\r&quot;.date(&quot;Y-m-d H:i:s&quot;);</li>
<li>	$log .= &quot;\n\r\n\r&quot;;</li>
<li>	$handle = fopen($logfile,'a');</li>
<li>	fwrite($handle,$log);</li>
<li>	fclose($handle);</li>
<li>	sleep(SLEEPTIME);</li>
<li>}</li>
<li>&nbsp;</li>
<li>function getload()&nbsp; &nbsp; &nbsp; //获得负载</li>
<li>{</li>
<li>	global $loadfile;</li>
<li>	return file_get_contents($loadfile);</li>
<li>}</li>
<li>function getmem()&nbsp; &nbsp; &nbsp; //获得内存占用</li>
<li>{</li>
<li>	global $memfile;</li>
<li>	$mem = file($memfile);</li>
<li>	return $mem[0];</li>
<li>}</li>
<li>function mymem()&nbsp; &nbsp; &nbsp; &nbsp;//程序本身内存占用</li>
<li>{</li>
<li>	$pid = getmypid();</li>
<li>	exec(&quot;ps -eo%mem,rss,pid | grep $pid&quot;, $output);</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$output = explode(&quot; &quot;, $output[0]);</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;return $output[1] * 1024;</li>
<li>}</li>
<li>?&gt;</li></ol></div>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/01/14/%e6%9c%8d%e5%8a%a1%e5%99%a8%e6%80%a7%e8%83%bd%e8%b4%9f%e8%bd%bd%e8%ae%b0%e5%bd%95%e5%b7%a5%e5%85%b7.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>Centos4初始化的一些脚本</title>
		<link>http://www.sunboyu.cn/2009/01/07/centos4%e5%88%9d%e5%a7%8b%e5%8c%96%e7%9a%84%e4%b8%80%e4%ba%9b%e8%84%9a%e6%9c%ac.shtml</link>
		<comments>http://www.sunboyu.cn/2009/01/07/centos4%e5%88%9d%e5%a7%8b%e5%8c%96%e7%9a%84%e4%b8%80%e4%ba%9b%e8%84%9a%e6%9c%ac.shtml#comments</comments>
		<pubDate>Wed, 07 Jan 2009 01:27:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[centos4]]></category>

		<category><![CDATA[yum]]></category>

		<category><![CDATA[源]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=465</guid>
		<description><![CDATA[#!/bin/sh
cd /etc/yum.repos.d
mv CentOS-Base.repo&#160; CentOS-Base.repo.save
wget http://centos.ustc.edu.cn/CentOS-Base.repo
yum install gcc4-c++
中国科技大学的源挺快的，因为是高校，所以比较稳定，一些其他服务器的过一段时间也许就消失了，所以不建议
网易的源  http://mirrors.163.com/.help/CentOS-Base-163.repo
搜狐的源 http://mirrors.sohu.com/help/CentOS-Base-sohu.repo
]]></description>
			<content:encoded><![CDATA[<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">#!/bin/sh</li>
<li>cd /etc/yum.repos.d</li>
<li>mv CentOS-Base.repo&nbsp; CentOS-Base.repo.save</li>
<li>wget http://centos.ustc.edu.cn/CentOS-Base.repo</li>
<li>yum install gcc4-c++</li></ol></div>
<p>中国科技大学的源挺快的，因为是高校，所以比较稳定，一些其他服务器的过一段时间也许就消失了，所以不建议</p>
<p>网易的源  http://mirrors.163.com/.help/CentOS-Base-163.repo</p>
<p>搜狐的源 http://mirrors.sohu.com/help/CentOS-Base-sohu.repo</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2009/01/07/centos4%e5%88%9d%e5%a7%8b%e5%8c%96%e7%9a%84%e4%b8%80%e4%ba%9b%e8%84%9a%e6%9c%ac.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>修改Linux用户登录的默认语言设置</title>
		<link>http://www.sunboyu.cn/2008/12/20/%e4%bf%ae%e6%94%b9linux%e7%94%a8%e6%88%b7%e7%99%bb%e5%bd%95%e7%9a%84%e9%bb%98%e8%ae%a4%e8%af%ad%e8%a8%80%e8%ae%be%e7%bd%ae.shtml</link>
		<comments>http://www.sunboyu.cn/2008/12/20/%e4%bf%ae%e6%94%b9linux%e7%94%a8%e6%88%b7%e7%99%bb%e5%bd%95%e7%9a%84%e9%bb%98%e8%ae%a4%e8%af%ad%e8%a8%80%e8%ae%be%e7%bd%ae.shtml#comments</comments>
		<pubDate>Sat, 20 Dec 2008 08:47:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[终端编码]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=436</guid>
		<description><![CDATA[进入linux中断，查看自己的设置，可以看下 env命令的回显
默认都是us_EN.UTF-8
有一些字符出来全是乱码，尝试修改一下
修改用户主目录下 .bash_profile 文件，增加一行 export LANG=zh_CN.gbk
然后logout，再重新登录，部分字符显示正常。
]]></description>
			<content:encoded><![CDATA[<p>进入linux中断，查看自己的设置，可以看下 env命令的回显</p>
<p>默认都是us_EN.UTF-8</p>
<p>有一些字符出来全是乱码，尝试修改一下</p>
<p>修改用户主目录下 .bash_profile 文件，增加一行 export LANG=zh_CN.gbk</p>
<p>然后logout，再重新登录，部分字符显示正常。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/12/20/%e4%bf%ae%e6%94%b9linux%e7%94%a8%e6%88%b7%e7%99%bb%e5%bd%95%e7%9a%84%e9%bb%98%e8%ae%a4%e8%af%ad%e8%a8%80%e8%ae%be%e7%bd%ae.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>sunboyu-amp-fastcgi-suexec-v22-alpha 发布</title>
		<link>http://www.sunboyu.cn/2008/12/20/sunboyu-amp-fastcgi-suexec-v22-alpha-%e5%8f%91%e5%b8%83.shtml</link>
		<comments>http://www.sunboyu.cn/2008/12/20/sunboyu-amp-fastcgi-suexec-v22-alpha-%e5%8f%91%e5%b8%83.shtml#comments</comments>
		<pubDate>Sat, 20 Dec 2008 07:06:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[amp]]></category>

		<category><![CDATA[apache]]></category>

		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=434</guid>
		<description><![CDATA[Linux下APACHE MYSQL PHP FCgid Suexec 自动安装脚本V2.2
1、增加了m4-1.4.9
2、增加了autoconf-2.62
这两个包在安装eaccelerator-0.9.5.2的时候使用
3、增加了PHP &#8211;with-mcrypt 参数
4、增加了PHP &#8211;enable-sockets 参数
sunboyu-amp-fastcgi-suexec-v22-alpha
]]></description>
			<content:encoded><![CDATA[<p>Linux下APACHE MYSQL PHP FCgid Suexec 自动安装脚本V2.2</p>
<p>1、增加了m4-1.4.9</p>
<p>2、增加了autoconf-2.62</p>
<p>这两个包在安装eaccelerator-0.9.5.2的时候使用</p>
<p>3、增加了PHP &#8211;with-mcrypt 参数</p>
<p>4、增加了PHP &#8211;enable-sockets 参数</p>
<p><a href="http://www.sunboyu.cn/upfiles/2008/12/sunboyu-amp-fastcgi-suexec-v22-alpha.txt">sunboyu-amp-fastcgi-suexec-v22-alpha</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/12/20/sunboyu-amp-fastcgi-suexec-v22-alpha-%e5%8f%91%e5%b8%83.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>Pure-ftpd安装配置草稿－补充完全</title>
		<link>http://www.sunboyu.cn/2008/12/18/pure-ftpd%e5%ae%89%e8%a3%85%e9%85%8d%e7%bd%ae%e8%8d%89%e7%a8%bf%ef%bc%8d%e8%a1%a5%e5%85%85%e5%ae%8c%e5%85%a8.shtml</link>
		<comments>http://www.sunboyu.cn/2008/12/18/pure-ftpd%e5%ae%89%e8%a3%85%e9%85%8d%e7%bd%ae%e8%8d%89%e7%a8%bf%ef%bc%8d%e8%a1%a5%e5%85%85%e5%ae%8c%e5%85%a8.shtml#comments</comments>
		<pubDate>Thu, 18 Dec 2008 01:47:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[pure-ftpd]]></category>

		<category><![CDATA[草稿]]></category>

		<category><![CDATA[配置]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=431</guid>
		<description><![CDATA[cp /opt/mysql-5.0.22/lib/mysql/* /usr/lib&#160; &#160; &#160; &#160; &#160; #解决编译依赖库问题
./configure --prefix=/opt/pure-ftpd \
--with-mysql=/opt/mysql-5.0.22 \
--with-rfc2640 \
--with-language=simplified-chinese \
--with-peruserlimits \
--with-diraliases \
--with-virtualchroot \
--with-virtualhosts \
--with-welcomemsg \
--with-ftpwho \
--with-quotas \
--with-throttling \
--with-cookie \
--with-extauth \
--with-puredb \
--with-altlog \
--with-sysquotas \
--with-paranoidmsg \
--with-ascii \
--with-inetd
&#160;
cp  $install_dir/pureftpd-mysql.conf /opt/pure-ftpd/
cp  $install_dir/configuration-file/pure-config.pl pure-ftpd.conf /opt/pure-ftpd/
启动服务  /opt/pure-ftpd/pure-config.pl pure-ftpd.conf
这里补充完整：
安装完后，很多配置文件还在原来的安装包里，并没有部署到prefix目标文件夹下，需要手工复制过去，就是上边那两个，一个启动脚本，pure-config.pl 还有性能监控工具，统计工具等。
另外一个经常出现的问题：(为了重现，还得修改成错误的)
 421 配置错误: 无效的SQL配置文件: /opt/pure-ftpd/etc/pureftpd-mysql.conf
这个问题网上很多问的，但解释不到位，这里详细解释一下：我们在编译的时候选择了好多参数，部分参数跟配置是对应的，只有编译相关模块，才能打开相关配置，否则是不行的，会报错，但这个软件报错不报错误行数，所以调试起来比较费劲，我是一个个配置行进行开关才发现这个问题的，比如，我开启了这行，MySQLGetRatioDL SELECT DLRatio FROM users WHERE User=&#8221;\L&#8221; 但我编译的时候未加 ratio这个参数，就报错了，所以在调试的时候一定要对照一下编译时候的参数。
mysql中，密码我用的encryt加密，调试记得打开防火墙，其他没什么需要注意的。
]]></description>
			<content:encoded><![CDATA[<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">cp /opt/mysql-5.0.22/lib/mysql/* /usr/lib&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #解决编译依赖库问题</li>
<li>./configure --prefix=/opt/pure-ftpd \</li>
<li>--with-mysql=/opt/mysql-5.0.22 \</li>
<li>--with-rfc2640 \</li>
<li>--with-language=simplified-chinese \</li>
<li>--with-peruserlimits \</li>
<li>--with-diraliases \</li>
<li>--with-virtualchroot \</li>
<li>--with-virtualhosts \</li>
<li>--with-welcomemsg \</li>
<li>--with-ftpwho \</li>
<li>--with-quotas \</li>
<li>--with-throttling \</li>
<li>--with-cookie \</li>
<li>--with-extauth \</li>
<li>--with-puredb \</li>
<li>--with-altlog \</li>
<li>--with-sysquotas \</li>
<li>--with-paranoidmsg \</li>
<li>--with-ascii \</li>
<li>--with-inetd</li>
<li>&nbsp;</li>
<li>cp  $install_dir/pureftpd-mysql.conf /opt/pure-ftpd/</li>
<li>cp  $install_dir/configuration-file/pure-config.pl pure-ftpd.conf /opt/pure-ftpd/</li></ol></div>
<p>启动服务  /opt/pure-ftpd/pure-config.pl pure-ftpd.conf</p>
<p>这里补充完整：<br />
安装完后，很多配置文件还在原来的安装包里，并没有部署到prefix目标文件夹下，需要手工复制过去，就是上边那两个，一个启动脚本，pure-config.pl 还有性能监控工具，统计工具等。<br />
另外一个经常出现的问题：(为了重现，还得修改成错误的)<br />
 421 配置错误: 无效的SQL配置文件: /opt/pure-ftpd/etc/pureftpd-mysql.conf<br />
这个问题网上很多问的，但解释不到位，这里详细解释一下：我们在编译的时候选择了好多参数，部分参数跟配置是对应的，只有编译相关模块，才能打开相关配置，否则是不行的，会报错，但这个软件报错不报错误行数，所以调试起来比较费劲，我是一个个配置行进行开关才发现这个问题的，比如，我开启了这行，MySQLGetRatioDL SELECT DLRatio FROM users WHERE User=&#8221;\L&#8221; 但我编译的时候未加 ratio这个参数，就报错了，所以在调试的时候一定要对照一下编译时候的参数。<br />
mysql中，密码我用的encryt加密，调试记得打开防火墙，其他没什么需要注意的。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/12/18/pure-ftpd%e5%ae%89%e8%a3%85%e9%85%8d%e7%bd%ae%e8%8d%89%e7%a8%bf%ef%bc%8d%e8%a1%a5%e5%85%85%e5%ae%8c%e5%85%a8.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>sunboyu-amp-fastcgi-suexec-v21-alpha 发布</title>
		<link>http://www.sunboyu.cn/2008/12/15/sunboyu-amp-fastcgi-suexec-v21-alpha-%e5%8f%91%e5%b8%83.shtml</link>
		<comments>http://www.sunboyu.cn/2008/12/15/sunboyu-amp-fastcgi-suexec-v21-alpha-%e5%8f%91%e5%b8%83.shtml#comments</comments>
		<pubDate>Mon, 15 Dec 2008 13:58:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[fastcgi]]></category>

		<category><![CDATA[LAMP]]></category>

		<category><![CDATA[mysql]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[suexec]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=428</guid>
		<description><![CDATA[Linux下APACHE MYSQL PHP FCgid Suexec 自动安装脚本V2.1
1、增加了PHP &#8211;enable-bcmath 参数，支持高精度函数库
2、增加了ncurses MYSQL的一个依赖库
3、增加了apache &#8211;enable-so 参数
sunboyu-amp-fastcgi-suexec-v21-alpha
此脚本在Centos4.7ServerCD 最小安装，root账户下执行完全正常。
]]></description>
			<content:encoded><![CDATA[<p>Linux下APACHE MYSQL PHP FCgid Suexec 自动安装脚本V2.1<br />
1、增加了PHP &#8211;enable-bcmath 参数，支持高精度函数库<br />
2、增加了ncurses MYSQL的一个依赖库<br />
3、增加了apache &#8211;enable-so 参数</p>
<p><a href='http://www.sunboyu.cn/upfiles/2008/12/sunboyu-amp-fastcgi-suexec-v21-alpha.txt'>sunboyu-amp-fastcgi-suexec-v21-alpha</a></p>
<p>此脚本在Centos4.7ServerCD 最小安装，root账户下执行完全正常。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/12/15/sunboyu-amp-fastcgi-suexec-v21-alpha-%e5%8f%91%e5%b8%83.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>全面切换到CentOS-4.7.ServerCD</title>
		<link>http://www.sunboyu.cn/2008/12/14/%e5%85%a8%e9%9d%a2%e5%88%87%e6%8d%a2%e5%88%b0centos-47servercd.shtml</link>
		<comments>http://www.sunboyu.cn/2008/12/14/%e5%85%a8%e9%9d%a2%e5%88%87%e6%8d%a2%e5%88%b0centos-47servercd.shtml#comments</comments>
		<pubDate>Sun, 14 Dec 2008 14:24:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[4.7]]></category>

		<category><![CDATA[centos]]></category>

		<category><![CDATA[servercd]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=427</guid>
		<description><![CDATA[下载地址 http://centos.ustc.edu.cn/centos/4.7/isos/x86_64/CentOS-4.7.ServerCD-x86_64.iso
注：根据需要下载x86_64或者i386版本
一般x86_64跑服务器或者64位CPU上，家用台式一般用i386，不过现在比较好的家用cpu也64位，我的就比较落后了……
安装还是老一套，我用vmware模拟的scis硬盘安装，选择的定制安全，选择组件那步直接选择mini安装即可。
因为5一直没有servercd，而发行版又太大，3个多G，所以还是选择这个精简的服务器版本。
]]></description>
			<content:encoded><![CDATA[<p>下载地址 http://centos.ustc.edu.cn/centos/4.7/isos/x86_64/CentOS-4.7.ServerCD-x86_64.iso<br />
注：根据需要下载x86_64或者i386版本<br />
一般x86_64跑服务器或者64位CPU上，家用台式一般用i386，不过现在比较好的家用cpu也64位，我的就比较落后了……</p>
<p>安装还是老一套，我用vmware模拟的scis硬盘安装，选择的定制安全，选择组件那步直接选择mini安装即可。</p>
<p>因为5一直没有servercd，而发行版又太大，3个多G，所以还是选择这个精简的服务器版本。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/12/14/%e5%85%a8%e9%9d%a2%e5%88%87%e6%8d%a2%e5%88%b0centos-47servercd.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>解决php模块ssh2的编译问题</title>
		<link>http://www.sunboyu.cn/2008/12/07/%e8%a7%a3%e5%86%b3php%e6%a8%a1%e5%9d%97ssh2%e7%9a%84%e7%bc%96%e8%af%91%e9%97%ae%e9%a2%98.shtml</link>
		<comments>http://www.sunboyu.cn/2008/12/07/%e8%a7%a3%e5%86%b3php%e6%a8%a1%e5%9d%97ssh2%e7%9a%84%e7%bc%96%e8%af%91%e9%97%ae%e9%a2%98.shtml#comments</comments>
		<pubDate>Sun, 07 Dec 2008 13:50:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[ssh2]]></category>

		<category><![CDATA[编译]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=415</guid>
		<description><![CDATA[这个问题一google就出来了，官方给出的解决方案，
在config.h里加上一个宏定义 #define LIBSSH2_APINO 200412301450,哇塞，一切OK
http://pecl.php.net/bugs/bug.php?id=9656
/root/ssh2-0.10/ssh2.c: In function 'zif_ssh2_methods_negotiated':
/root/ssh2-0.10/ssh2.c:483: warning: assignment discards qualifiers from pointer target type
/root/ssh2-0.10/ssh2.c:484: warning: assignment discards qualifiers from pointer target type
/root/ssh2-0.10/ssh2.c:485: warning: assignment discards qualifiers from pointer target type
/root/ssh2-0.10/ssh2.c:486: warning: assignment discards qualifiers from pointer target type
/root/ssh2-0.10/ssh2.c:487: warning: assignment discards qualifiers from pointer target type
/root/ssh2-0.10/ssh2.c:488: warning: assignment discards qualifiers from pointer target type
/root/ssh2-0.10/ssh2.c:489: [...]]]></description>
			<content:encoded><![CDATA[<p>这个问题一google就出来了，官方给出的解决方案，<br />
在config.h里加上一个宏定义 #define LIBSSH2_APINO 200412301450,哇塞，一切OK<br />
http://pecl.php.net/bugs/bug.php?id=9656</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">/root/ssh2-0.10/ssh2.c: In function 'zif_ssh2_methods_negotiated':</li>
<li>/root/ssh2-0.10/ssh2.c:483: warning: assignment discards qualifiers from pointer target type</li>
<li>/root/ssh2-0.10/ssh2.c:484: warning: assignment discards qualifiers from pointer target type</li>
<li>/root/ssh2-0.10/ssh2.c:485: warning: assignment discards qualifiers from pointer target type</li>
<li>/root/ssh2-0.10/ssh2.c:486: warning: assignment discards qualifiers from pointer target type</li>
<li>/root/ssh2-0.10/ssh2.c:487: warning: assignment discards qualifiers from pointer target type</li>
<li>/root/ssh2-0.10/ssh2.c:488: warning: assignment discards qualifiers from pointer target type</li>
<li>/root/ssh2-0.10/ssh2.c:489: warning: assignment discards qualifiers from pointer target type</li>
<li>/root/ssh2-0.10/ssh2.c:490: warning: assignment discards qualifiers from pointer target type</li>
<li>/root/ssh2-0.10/ssh2.c:491: warning: assignment discards qualifiers from pointer target type</li>
<li>/root/ssh2-0.10/ssh2.c:492: warning: assignment discards qualifiers from pointer target type</li>
<li>/root/ssh2-0.10/ssh2.c: In function 'zif_ssh2_fingerprint':</li>
<li>/root/ssh2-0.10/ssh2.c:536: warning: assignment discards qualifiers from pointer target type</li>
<li>/root/ssh2-0.10/ssh2.c: In function 'zif_ssh2_publickey_add':</li>
<li>/root/ssh2-0.10/ssh2.c:1038: warning: passing argument 1 of '_efree' discards qualifiers from pointer target type</li>
<li>/root/ssh2-0.10/ssh2.c: In function 'zif_ssh2_publickey_list':</li>
<li>/root/ssh2-0.10/ssh2.c:1097: warning: passing argument 4 of 'add_assoc_stringl_ex' discards qualifiers from pointer target type</li>
<li>/root/ssh2-0.10/ssh2.c:1098: warning: passing argument 4 of 'add_assoc_stringl_ex' discards qualifiers from pointer target type</li>
<li>/root/ssh2-0.10/ssh2.c:1106: warning: initialization discards qualifiers from pointer target type</li>
<li>/root/ssh2-0.10/ssh2.c:1107: warning: passing argument 2 of '_zend_hash_add_or_update' discards qualifiers from pointer target type</li>
<li>/bin/sh /root/ssh2-0.10/libtool --mode=compile gcc&nbsp; -I. -I</li></ol></div>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/12/07/%e8%a7%a3%e5%86%b3php%e6%a8%a1%e5%9d%97ssh2%e7%9a%84%e7%bc%96%e8%af%91%e9%97%ae%e9%a2%98.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>我的一个虚拟主机配置，支持suexec+fastcgi+php+perl</title>
		<link>http://www.sunboyu.cn/2008/11/22/%e6%88%91%e7%9a%84%e4%b8%80%e4%b8%aa%e8%99%9a%e6%8b%9f%e4%b8%bb%e6%9c%ba%e9%85%8d%e7%bd%ae%ef%bc%8c%e6%94%af%e6%8c%81suexecfastcgiphpperl.shtml</link>
		<comments>http://www.sunboyu.cn/2008/11/22/%e6%88%91%e7%9a%84%e4%b8%80%e4%b8%aa%e8%99%9a%e6%8b%9f%e4%b8%bb%e6%9c%ba%e9%85%8d%e7%bd%ae%ef%bc%8c%e6%94%af%e6%8c%81suexecfastcgiphpperl.shtml#comments</comments>
		<pubDate>Sat, 22 Nov 2008 05:36:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[虚拟主机]]></category>

		<category><![CDATA[配置]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=392</guid>
		<description><![CDATA[&#60;virtualhost *:80&#62;
&#160;&#160; &#160;SuexecUserGroup www www
&#160;&#160; &#160;ServerAdmin webmaster@dummy-host.example.com
&#160;&#160; &#160;DocumentRoot &#34;/home/www/php&#34;
&#160;&#160; &#160;ServerName 192.168.43.129
&#160;&#160; &#160;ServerAlias www.dummy-host.example.com
&#160;&#160; &#160;ErrorLog &#34;logs/dummy-host.example.com-error_log&#34;
&#160;&#160; &#160;CustomLog &#34;logs/dummy-host.example.com-access_log&#34; combined
&#160;&#160; &#160;&#60;directory /home/www/php&#62;
&#160;&#160; &#160; &#160; &#160;AddHandler fcgid-script .php
&#160;&#160; &#160; &#160; &#160;AddHandler perl-script .pl .cgi
&#160;&#160; &#160; &#160; &#160;PerlResponseHandler ModPerl::Registry
&#160;&#160; &#160; &#160; &#160;PerlOptions +ParseHeaders
&#160;&#160; &#160; &#160; &#160;PerlOptions +SetupEnv
&#160;&#160; &#160; &#160; &#160;FCGIWrapper /home/www/php-cgi .php
&#160;&#160; &#160; &#160; &#160;Options ExecCGI +FollowSymLinks SymLinksIfOwnerMatch
&#160;&#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">&lt;virtualhost *:80&gt;</li>
<li>&nbsp;&nbsp; &nbsp;SuexecUserGroup www www</li>
<li>&nbsp;&nbsp; &nbsp;ServerAdmin webmaster@dummy-host.example.com</li>
<li>&nbsp;&nbsp; &nbsp;DocumentRoot &quot;/home/www/php&quot;</li>
<li>&nbsp;&nbsp; &nbsp;ServerName 192.168.43.129</li>
<li>&nbsp;&nbsp; &nbsp;ServerAlias www.dummy-host.example.com</li>
<li>&nbsp;&nbsp; &nbsp;ErrorLog &quot;logs/dummy-host.example.com-error_log&quot;</li>
<li>&nbsp;&nbsp; &nbsp;CustomLog &quot;logs/dummy-host.example.com-access_log&quot; combined</li>
<li>&nbsp;&nbsp; &nbsp;&lt;directory /home/www/php&gt;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;AddHandler fcgid-script .php</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;AddHandler perl-script .pl .cgi</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;PerlResponseHandler ModPerl::Registry</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;PerlOptions +ParseHeaders</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;PerlOptions +SetupEnv</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;FCGIWrapper /home/www/php-cgi .php</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Options ExecCGI +FollowSymLinks SymLinksIfOwnerMatch</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;allow from all</li>
<li>&nbsp;&nbsp; &nbsp;&lt;/directory&gt;</li>
<li>&lt;/virtualhost&gt;</li></ol></div>
<p>老一套，要注意的是各种脚本的映射，容器的合理使用。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/11/22/%e6%88%91%e7%9a%84%e4%b8%80%e4%b8%aa%e8%99%9a%e6%8b%9f%e4%b8%bb%e6%9c%ba%e9%85%8d%e7%bd%ae%ef%bc%8c%e6%94%af%e6%8c%81suexecfastcgiphpperl.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>给APACHE增加mod_perl,使其支持perl脚本编写的程序</title>
		<link>http://www.sunboyu.cn/2008/11/21/%e7%bb%99apache%e5%a2%9e%e5%8a%a0mod_perl%e4%bd%bf%e5%85%b6%e6%94%af%e6%8c%81perl%e8%84%9a%e6%9c%ac%e7%bc%96%e5%86%99%e7%9a%84%e7%a8%8b%e5%ba%8f.shtml</link>
		<comments>http://www.sunboyu.cn/2008/11/21/%e7%bb%99apache%e5%a2%9e%e5%8a%a0mod_perl%e4%bd%bf%e5%85%b6%e6%94%af%e6%8c%81perl%e8%84%9a%e6%9c%ac%e7%bc%96%e5%86%99%e7%9a%84%e7%a8%8b%e5%ba%8f.shtml#comments</comments>
		<pubDate>Fri, 21 Nov 2008 08:59:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[apache]]></category>

		<category><![CDATA[cgi]]></category>

		<category><![CDATA[mod_perl]]></category>

		<category><![CDATA[perl]]></category>

		<category><![CDATA[pl]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=391</guid>
		<description><![CDATA[老样子，下载 perl-5.8.8.tar.gz mod_perl-2.0-current.tar.gz perlinfo.zip
wget http://www.sunboyu.cn/sourse/perl-5.8.8.tar.gz
wget http://www.sunboyu.cn/sourse/mod_perl-2.0-current.tar.gz
wget http://www.sunboyu.cn/sourse/perlinfo.zip
tar -zxvf perl-5.8.8.tar.gz
tar -zxvf mod_perl-2.0-current.tar.gz
tar -zxvf perl-5.8.8.tar.gz
先安装perl ./Configure -h  看帮助吧，忘了
在安装 mod_perl  #perl Makefile.PL WITH_APXS=/opt/httpd-2.2.9/bin/apxs
如果报错，看看帮助，得加几个参数
然后修改 httpd.conf ,增加 LoadModule perl_module modules/mod_perl.so
最后在虚拟目录里增加
&#60;location /cgi-bin&#62;
&#160; SetHandler perl-script
&#160; PerlResponseHandler ModPerl::Registry
&#160; Options +ExecCGI
&#160; PerlOptions +ParseHeaders
&#160; PerlOptions +SetupEnv
&#60;/location&#62;
然后把perlinfo.zip里那个探针放在cgi-bin目录下，访问一下，如果显示相关信息，证明配置成功。
费了半天劲，就为了用一个awstats。
突发奇想，是不是把python和ruby也配置上？
]]></description>
			<content:encoded><![CDATA[<p>老样子，下载 perl-5.8.8.tar.gz mod_perl-2.0-current.tar.gz perlinfo.zip<br />
wget http://www.sunboyu.cn/sourse/perl-5.8.8.tar.gz<br />
wget http://www.sunboyu.cn/sourse/mod_perl-2.0-current.tar.gz<br />
wget http://www.sunboyu.cn/sourse/perlinfo.zip</p>
<p>tar -zxvf perl-5.8.8.tar.gz<br />
tar -zxvf mod_perl-2.0-current.tar.gz<br />
tar -zxvf perl-5.8.8.tar.gz</p>
<p>先安装perl ./Configure -h  看帮助吧，忘了<br />
在安装 mod_perl  #perl Makefile.PL WITH_APXS=/opt/httpd-2.2.9/bin/apxs<br />
如果报错，看看帮助，得加几个参数<br />
然后修改 httpd.conf ,增加 LoadModule perl_module modules/mod_perl.so<br />
最后在虚拟目录里增加</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">&lt;location /cgi-bin&gt;</li>
<li>&nbsp; SetHandler perl-script</li>
<li>&nbsp; PerlResponseHandler ModPerl::Registry</li>
<li>&nbsp; Options +ExecCGI</li>
<li>&nbsp; PerlOptions +ParseHeaders</li>
<li>&nbsp; PerlOptions +SetupEnv</li>
<li>&lt;/location&gt;</li></ol></div>
<p>然后把perlinfo.zip里那个探针放在cgi-bin目录下，访问一下，如果显示相关信息，证明配置成功。<br />
费了半天劲，就为了用一个awstats。<br />
突发奇想，是不是把python和ruby也配置上？</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/11/21/%e7%bb%99apache%e5%a2%9e%e5%8a%a0mod_perl%e4%bd%bf%e5%85%b6%e6%94%af%e6%8c%81perl%e8%84%9a%e6%9c%ac%e7%bc%96%e5%86%99%e7%9a%84%e7%a8%8b%e5%ba%8f.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>Ubuntu系统同步跟进</title>
		<link>http://www.sunboyu.cn/2008/11/09/ubuntu%e7%b3%bb%e7%bb%9f%e5%90%8c%e6%ad%a5%e8%b7%9f%e8%bf%9b.shtml</link>
		<comments>http://www.sunboyu.cn/2008/11/09/ubuntu%e7%b3%bb%e7%bb%9f%e5%90%8c%e6%ad%a5%e8%b7%9f%e8%bf%9b.shtml#comments</comments>
		<pubDate>Sun, 09 Nov 2008 06:18:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[ubuntu8.10]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=378</guid>
		<description><![CDATA[Ubuntu8.10在2008年10月30日终于到来，跟官方所要了两张作为纪念，同时刻了一张进行试用。
新版的跟8.04没看出太大的区别，对于那个立方体效果，我也没有试用。系统是让用的，不是用来玩的，关闭所有的特效，能顺利工作才是。
我用的惠普康柏 V3729 系列，系统安装后，自动识别无线网卡，这是首要的，拉线的感觉可不好。官方发布后，国内的更新源也同步更新了，cn99的不太好用，我用的lupaworld的源,比较快
deb http://mirror.lupaworld.com/ubuntu intrepid main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu intrepid-security main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu intrepid-updates main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu intrepid-backports main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu intrepid-proposed main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu intrepid main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu intrepid-security main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu intrepid-updates main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu intrepid-backports main restricted [...]]]></description>
			<content:encoded><![CDATA[<p>Ubuntu8.10在2008年10月30日终于到来，跟官方所要了两张作为纪念，同时刻了一张进行试用。<br />
新版的跟8.04没看出太大的区别，对于那个立方体效果，我也没有试用。系统是让用的，不是用来玩的，关闭所有的特效，能顺利工作才是。<br />
我用的惠普康柏 V3729 系列，系统安装后，自动识别无线网卡，这是首要的，拉线的感觉可不好。官方发布后，国内的更新源也同步更新了，cn99的不太好用，我用的lupaworld的源,比较快</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">deb http://mirror.lupaworld.com/ubuntu intrepid main restricted universe multiverse</li>
<li>deb http://mirror.lupaworld.com/ubuntu intrepid-security main restricted universe multiverse</li>
<li>deb http://mirror.lupaworld.com/ubuntu intrepid-updates main restricted universe multiverse</li>
<li>deb http://mirror.lupaworld.com/ubuntu intrepid-backports main restricted universe multiverse</li>
<li>deb http://mirror.lupaworld.com/ubuntu intrepid-proposed main restricted universe multiverse</li>
<li>deb-src http://mirror.lupaworld.com/ubuntu intrepid main restricted universe multiverse</li>
<li>deb-src http://mirror.lupaworld.com/ubuntu intrepid-security main restricted universe multiverse</li>
<li>deb-src http://mirror.lupaworld.com/ubuntu intrepid-updates main restricted universe multiverse</li>
<li>deb-src http://mirror.lupaworld.com/ubuntu intrepid-backports main restricted universe multiverse</li>
<li>deb-src http://mirror.lupaworld.com/ubuntu intrepid-proposed main restricted universe multiverse</li></ol></div>
<p>我的机器是 NVIDIA GeForce 7150M的显卡，默认是不支持的，但 apt-get upgrade后，可以用新力德自动安装显卡驱动。为这驱动我费了不少劲，官方的下载了不少，也没装上。<br />
整体装完后，更新了mplayer，可以播放mp3，但rmvb的不能播放，下载了realplaylinux版，只有图像没有声音。<br />
在更新完</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">sudo apt-get install gstreamer0.10-pitfdll gstreamer0.10-ffmpeg gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse </li>
<li>sudo apt-get install libxine-extracodecs totem-xine ffmpeg lame faad sox mjpegtools libxine-main1</li></ol></div>
<p>后，realplay运行正常。msn用Pidgin,qq使用官方的ubuntu版本，很流畅，不过还不能看迅雷看看，回头装wine试试。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/11/09/ubuntu%e7%b3%bb%e7%bb%9f%e5%90%8c%e6%ad%a5%e8%b7%9f%e8%bf%9b.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>linux_apache_php_mysql_fcgid_suexec_高效安全的主机配置方案</title>
		<link>http://www.sunboyu.cn/2008/11/08/linux_apache_php_mysql_fcgid_suexec_%e9%ab%98%e6%95%88%e5%ae%89%e5%85%a8%e7%9a%84%e4%b8%bb%e6%9c%ba%e9%85%8d%e7%bd%ae%e6%96%b9%e6%a1%88.shtml</link>
		<comments>http://www.sunboyu.cn/2008/11/08/linux_apache_php_mysql_fcgid_suexec_%e9%ab%98%e6%95%88%e5%ae%89%e5%85%a8%e7%9a%84%e4%b8%bb%e6%9c%ba%e9%85%8d%e7%bd%ae%e6%96%b9%e6%a1%88.shtml#comments</comments>
		<pubDate>Sat, 08 Nov 2008 14:35:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[apache]]></category>

		<category><![CDATA[fastcgi]]></category>

		<category><![CDATA[fcgid]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[suexec]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=376</guid>
		<description><![CDATA[linux+apache+php+mysql+fcgid+suexec 高效安全主机配置
最近一直在研究web服务器的配置和安全配置，基本搞完了
window2003下
iis+php(isapi)
apache+php(mod)
linux下
apache+php(mod)
apache+php(fastcgi)
四种安装方式的安全设置。其中涉及一些性能方面的调整，但没有实际的环境来测试，所以只涉及方法，不涉及具体的应用，而在安全方面下了很大的功夫。
底下我针对比较复杂的一种安装模式apache+php(fastcgi)进行详细讲解，来介绍如何配置一个安全的虚拟主机系统。
调试环境：
CentOS5
Apache2.2.9
Mysql5.0.22
PHP5.2.6
Fcgid2.4.6
需要的脚本  sunboyu-amp-fastcgi-suexec-v20-alpha
首先用脚本 unboyu-amp-fastcgi-v20-fcgid-suexec-alpha.txt 进行安装。
注：我在我的服务器上做了一个源，如果你感觉较慢的话，可以先吧软件下载到本地，然后修改一下脚本进行安装。
整体运行完后，apache是能成功运行的，但访问的话显示权限错误，底下主要是配置权限
过程用命令来显示，比较符合技术人员的习惯
1、vi /opt/httpd-2.2.9/conf/httpd.conf
修改 User daemon
Group daemon
为 User apache
Group apache
去掉 #Include conf/extra/httpd-vhosts.conf 前边的#，使其生效
2、增加一个虚拟站点的账户
groupadd www
useradd -g www www
现在应该有个目录 /home/www
3、vi /opt/httpd-2.2.9/conf/extra/httpd-vhost.conf
屏蔽或直接删除原来的站点信息
SuexecUserGroup www www #这里一定要弄清楚是做什么用的
ServerAdmin sunboyu@gmail.com
DocumentRoot &#8220;/home/www/php-cgi&#8221;
ServerName 192.168.0.5 #我测试的ip是这个，实际应该为你的域名
ServerAlias www.dummy-host.example.com #别名
ErrorLog &#8220;logs/dummy-host.example.com-error_log&#8221; #日志，用独立的名字
CustomLog &#8220;logs/dummy-host.example.com-access_log&#8221; common
SetHandler fcgid-script #我在编译完apache，附加了两个模块，fastcgi和fcgid，后一个是国人开发的，比fastcgi更稳定和易用
FCGIWrapper /home/www/php/php-cgi .php # php-cgi 是站点下的一个文件，下边建立
Options ExecCGI
allow from all
然后: x 即可
4、建立脚本 /home/www/php/php-cgi
vi /home/www/php/php-cgi
内容为
#!/bin/sh
export PHPRC=/home/www/php-cgi
export PHP_FCGI_CHILDREN=5 #创建的fcgi进程
export PHP_FCGI_MAX_REQUESTS=5000 #最大连接数
/opt/php-5.2.6/bin/php-cgi #php-cgi程序的位置
: x
5、创建独立的php.ini配置文件
cp [...]]]></description>
			<content:encoded><![CDATA[<p>linux+apache+php+mysql+fcgid+suexec 高效安全主机配置</p>
<p>最近一直在研究web服务器的配置和安全配置，基本搞完了<br />
window2003下<br />
iis+php(isapi)<br />
apache+php(mod)<br />
linux下<br />
apache+php(mod)<br />
apache+php(fastcgi)<br />
四种安装方式的安全设置。其中涉及一些性能方面的调整，但没有实际的环境来测试，所以只涉及方法，不涉及具体的应用，而在安全方面下了很大的功夫。<br />
底下我针对比较复杂的一种安装模式apache+php(fastcgi)进行详细讲解，来介绍如何配置一个安全的虚拟主机系统。</p>
<p>调试环境：</p>
<p>CentOS5<br />
Apache2.2.9<br />
Mysql5.0.22<br />
PHP5.2.6<br />
Fcgid2.4.6</p>
<p>需要的脚本  <a href='http://www.sunboyu.cn/upfiles/2008/12/sunboyu-amp-fastcgi-suexec-v20-alpha.txt'>sunboyu-amp-fastcgi-suexec-v20-alpha</a></p>
<p>首先用脚本 unboyu-amp-fastcgi-v20-fcgid-suexec-alpha.txt 进行安装。<br />
注：我在我的服务器上做了一个源，如果你感觉较慢的话，可以先吧软件下载到本地，然后修改一下脚本进行安装。</p>
<p>整体运行完后，apache是能成功运行的，但访问的话显示权限错误，底下主要是配置权限<br />
过程用命令来显示，比较符合技术人员的习惯<br />
1、vi /opt/httpd-2.2.9/conf/httpd.conf</p>
<p>修改 User daemon<br />
Group daemon<br />
为 User apache<br />
Group apache</p>
<p>去掉 #Include conf/extra/httpd-vhosts.conf 前边的#，使其生效</p>
<p>2、增加一个虚拟站点的账户</p>
<p>groupadd www<br />
useradd -g www www</p>
<p>现在应该有个目录 /home/www</p>
<p>3、vi /opt/httpd-2.2.9/conf/extra/httpd-vhost.conf</p>
<p>屏蔽或直接删除原来的站点信息<br />
SuexecUserGroup www www #这里一定要弄清楚是做什么用的<br />
ServerAdmin sunboyu@gmail.com<br />
DocumentRoot &#8220;/home/www/php-cgi&#8221;<br />
ServerName 192.168.0.5 #我测试的ip是这个，实际应该为你的域名<br />
ServerAlias www.dummy-host.example.com #别名<br />
ErrorLog &#8220;logs/dummy-host.example.com-error_log&#8221; #日志，用独立的名字<br />
CustomLog &#8220;logs/dummy-host.example.com-access_log&#8221; common</p>
<p>SetHandler fcgid-script #我在编译完apache，附加了两个模块，fastcgi和fcgid，后一个是国人开发的，比fastcgi更稳定和易用<br />
FCGIWrapper /home/www/php/php-cgi .php # php-cgi 是站点下的一个文件，下边建立<br />
Options ExecCGI<br />
allow from all<br />
然后: x 即可</p>
<p>4、建立脚本 /home/www/php/php-cgi</p>
<p>vi /home/www/php/php-cgi<br />
内容为<br />
#!/bin/sh<br />
export PHPRC=/home/www/php-cgi<br />
export PHP_FCGI_CHILDREN=5 #创建的fcgi进程<br />
export PHP_FCGI_MAX_REQUESTS=5000 #最大连接数<br />
/opt/php-5.2.6/bin/php-cgi #php-cgi程序的位置</p>
<p>: x</p>
<p>5、创建独立的php.ini配置文件<br />
cp /opt/php-5.2.6/lib/php.ini /home/www/php-cgi/php.ini</p>
<p>6、修改PHP的open_basedir</p>
<p>在/home/www/php-cgi/php.ini中找到<br />
open_basedir , 修改为<br />
open_basedir = /home/www/php<br />
注：safe_mode_exec_dir 之类的参数如果从比较变态的安全设置来说，也是应该来设定的，但我还不变态</p>
<p>7、配置权限<br />
chgrp root /opt/httpd-2.2.9/bin/suexec<br />
chmod 4751 /opt/httpd-2.2.9/bin/suexec<br />
chown www:www -R /home/www<br />
chmod 755 -R /home/www<br />
chmod 700 -R /home/www/php-cgi/php-cgi</p>
<p>8、重启<br />
server httpd restart</p>
<p>9、如果你能看到成功页面，然后就传一个PHP木马上去测试一下权限和安全的问题.<br />
如果连启动都启动不了，那就得查httpd的error_log ，suexec_log，然后去google一下，看看是哪的权限问题。</p>
<p>总结：本人教懒，整个过程调通后，也没写文档，但看到网上此类资料不多，而且有一些都没有命中要害，比如一些权限的配置和相对详尽的说明。我的注释只是把一些网上没有的解释而我弄明白后的理解写在了上边，但真正要想明白，估计还得搬着手册和google去一条条查。而且，我不是边做边写的，而是根据原来的配置盲写了一遍，估计会不少错误，总比没有强。如果有谁发现这个安全依然有问题，可以帮我提出，因为在安全方面我对自己要求很高。<br />
如果有什么需要讨论的，可以加入这个MSN群 lampper@live.cn （加为msn好友即可）</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/11/08/linux_apache_php_mysql_fcgid_suexec_%e9%ab%98%e6%95%88%e5%ae%89%e5%85%a8%e7%9a%84%e4%b8%bb%e6%9c%ba%e9%85%8d%e7%bd%ae%e6%96%b9%e6%a1%88.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>伟大的进步</title>
		<link>http://www.sunboyu.cn/2008/11/05/%e4%bc%9f%e5%a4%a7%e7%9a%84%e8%bf%9b%e6%ad%a5.shtml</link>
		<comments>http://www.sunboyu.cn/2008/11/05/%e4%bc%9f%e5%a4%a7%e7%9a%84%e8%bf%9b%e6%ad%a5.shtml#comments</comments>
		<pubDate>Wed, 05 Nov 2008 14:09:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[安全]]></category>

		<category><![CDATA[虚拟主机]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=373</guid>
		<description><![CDATA[博客很久没更新，导致alexa排名暴跌，因为最近在研究linux下apache＋php的系统安全问题，这个问题困扰了好久。因为配置iis（之前有此文章）的时候，我设置了非常安全的iis站点用户和权限的隔离，但在linux下，总没有找到好的方法。
最近查阅了大量的资料，主要是了解apache的账户机制，suexec的工作原理，然后又翻看了大量的资料，终于搞清楚了一套完整的安全的lamp虚拟主机配置方法，能达到站点的权限隔离，进程账户的相对独立，以及对性能的控制。
在学习的过程中，常犯的错误，就是轻敌。总感觉这事不难，一会就搞定。但实际头疼了半个月。另外就是不看日志。到最后两天，大量的调试是在对比日志和理解日志的涵义，针对日志去进行配置。从我学linux的过程来看，看手册，翻日志，分析别人的案例，是学习的最佳途径。
关于安全配置linux虚拟主机的过程，我将另写文章。
]]></description>
			<content:encoded><![CDATA[<p>博客很久没更新，导致alexa排名暴跌，因为最近在研究linux下apache＋php的系统安全问题，这个问题困扰了好久。因为配置iis（之前有此文章）的时候，我设置了非常安全的iis站点用户和权限的隔离，但在linux下，总没有找到好的方法。</p>
<p>最近查阅了大量的资料，主要是了解apache的账户机制，suexec的工作原理，然后又翻看了大量的资料，终于搞清楚了一套完整的安全的lamp虚拟主机配置方法，能达到站点的权限隔离，进程账户的相对独立，以及对性能的控制。</p>
<p>在学习的过程中，常犯的错误，就是轻敌。总感觉这事不难，一会就搞定。但实际头疼了半个月。另外就是不看日志。到最后两天，大量的调试是在对比日志和理解日志的涵义，针对日志去进行配置。从我学linux的过程来看，看手册，翻日志，分析别人的案例，是学习的最佳途径。</p>
<p>关于安全配置linux虚拟主机的过程，我将另写文章。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/11/05/%e4%bc%9f%e5%a4%a7%e7%9a%84%e8%bf%9b%e6%ad%a5.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>Amp Linux自动安装脚本（FastCgi）2.0发布</title>
		<link>http://www.sunboyu.cn/2008/11/03/amp-linux%e8%87%aa%e5%8a%a8%e5%ae%89%e8%a3%85%e8%84%9a%e6%9c%ac%ef%bc%88fastcgi%ef%bc%8920%e5%8f%91%e5%b8%83.shtml</link>
		<comments>http://www.sunboyu.cn/2008/11/03/amp-linux%e8%87%aa%e5%8a%a8%e5%ae%89%e8%a3%85%e8%84%9a%e6%9c%ac%ef%bc%88fastcgi%ef%bc%8920%e5%8f%91%e5%b8%83.shtml#comments</comments>
		<pubDate>Mon, 03 Nov 2008 09:51:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=369</guid>
		<description><![CDATA[sunboyu-amp-fastcgi-v20-alpha
本来模块方式跟fastcgi方式的版本可以同步发布的，单由于不争气的hp本本，推迟N天发布。
目前本版本可以安装使用，但由于启用了suexec的安全方式，在虚拟主机下还不能应用，因为linux权限系统很严格，目前还没有彻底搞透suexec的权限机制。
估计以下的几天都得搞这个问题了。我从google上搜索了不少的文章，可惜权限细节配置的方面不多，即使有详细的，也没有说明白原理，所以还是得自己来搞了。
这个版本的更新，跟模块方式编译的类似，如下：
1、增加 OSSP mm 库，PHP可以在此库的支持下保存session到内存 http://www.ossp.org/pkg/lib/mm/
2、增加eaccelerator-0.9.5.2 opcode缓存  http://eaccelerator.net/
3、Apache开启status模块
4、增加了suexec安全访问方式的配置（研究调试中）。
欢迎大家加入LAMPer msn群 lampper@live.cn 加这个号为msn好友即可
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sunboyu.cn/upfiles/2008/11/sunboyu-amp-fastcgi-v20-alpha.txt">sunboyu-amp-fastcgi-v20-alpha</a></p>
<p>本来模块方式跟fastcgi方式的版本可以同步发布的，单由于不争气的hp本本，推迟N天发布。</p>
<p>目前本版本可以安装使用，但由于启用了suexec的安全方式，在虚拟主机下还不能应用，因为linux权限系统很严格，目前还没有彻底搞透suexec的权限机制。</p>
<p>估计以下的几天都得搞这个问题了。我从google上搜索了不少的文章，可惜权限细节配置的方面不多，即使有详细的，也没有说明白原理，所以还是得自己来搞了。</p>
<p>这个版本的更新，跟模块方式编译的类似，如下：</p>
<p>1、增加 OSSP mm 库，PHP可以在此库的支持下保存session到内存 http://www.ossp.org/pkg/lib/mm/</p>
<p>2、增加eaccelerator-0.9.5.2 opcode缓存  http://eaccelerator.net/</p>
<p>3、Apache开启status模块</p>
<p>4、增加了suexec安全访问方式的配置（研究调试中）。</p>
<p>欢迎大家加入LAMPer msn群 lampper@live.cn 加这个号为msn好友即可</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/11/03/amp-linux%e8%87%aa%e5%8a%a8%e5%ae%89%e8%a3%85%e8%84%9a%e6%9c%ac%ef%bc%88fastcgi%ef%bc%8920%e5%8f%91%e5%b8%83.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>Amp Linux自动安装脚本（模块方式安装）2.0发布</title>
		<link>http://www.sunboyu.cn/2008/10/27/amp-linux%e8%87%aa%e5%8a%a8%e5%ae%89%e8%a3%85%e8%84%9a%e6%9c%ac%ef%bc%88%e6%a8%a1%e5%9d%97%e6%96%b9%e5%bc%8f%e5%ae%89%e8%a3%85%ef%bc%8920%e5%8f%91%e5%b8%83.shtml</link>
		<comments>http://www.sunboyu.cn/2008/10/27/amp-linux%e8%87%aa%e5%8a%a8%e5%ae%89%e8%a3%85%e8%84%9a%e6%9c%ac%ef%bc%88%e6%a8%a1%e5%9d%97%e6%96%b9%e5%bc%8f%e5%ae%89%e8%a3%85%ef%bc%8920%e5%8f%91%e5%b8%83.shtml#comments</comments>
		<pubDate>Mon, 27 Oct 2008 02:44:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[amp]]></category>

		<category><![CDATA[mod]]></category>

		<category><![CDATA[v2.0]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=364</guid>
		<description><![CDATA[sunboyu-amp-mod-v20-alpha
更改记录：
1、增加 OSSP mm 库，PHP可以在此库的支持下保存session到内存 http://www.ossp.org/pkg/lib/mm/
2、增加eaccelerator-0.9.5.2 opcode缓存  http://eaccelerator.net/
3、Apache开启status模块
本软件无stable版本，因为脚本并不是一个兼容各个linux系统的脚本，而是我在平时使用时做个一个简单批处理，来简化服务器配置的繁琐过程.
我使用的环境是Centos5.0，使用的定制安装，安装尽量最小化（本人有系统洁癖），以后系统还会更简化，我会尽量得使用编译的方式安装所有的软件，并不是说自己编译的就肯定比别人编译的好，参数更优化，而是通过这些繁琐的东西来提高对服务器性能跟参数之间关系的认识。
建议网友在做服务器的时候，不要按照我的默认脚本安装，因为这个脚本只注重了功能的大而全而并未关注性能和稳定，所以，本脚本只适合大家去研究，或者学习这个过程。
以后的版本会逐渐把一些优化的思想加入，但终归是个人的一些思想，不一定适合所有人，而且，这只是一个单机服务器的配置过程，对于大型系统是不适合的。
欢迎大家加入LAMP MSN 群交流 ( 加 lampper@live.cn 为msn好友)
顺便BS一下惠普笔记本V3000系列＋宇瞻内存，太不兼容了，以至我调试脚本的时候不断死机（调试一遍得一小时呢－－&#124;）
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sunboyu.cn/upfiles/2008/10/sunboyu-amp-mod-v20-alpha.txt">sunboyu-amp-mod-v20-alpha</a></p>
<p>更改记录：</p>
<p>1、增加 OSSP mm 库，PHP可以在此库的支持下保存session到内存 http://www.ossp.org/pkg/lib/mm/</p>
<p>2、增加eaccelerator-0.9.5.2 opcode缓存  http://eaccelerator.net/</p>
<p>3、Apache开启status模块</p>
<p>本软件无stable版本，因为脚本并不是一个兼容各个linux系统的脚本，而是我在平时使用时做个一个简单批处理，来简化服务器配置的繁琐过程.</p>
<p>我使用的环境是Centos5.0，使用的定制安装，安装尽量最小化（本人有系统洁癖），以后系统还会更简化，我会尽量得使用编译的方式安装所有的软件，并不是说自己编译的就肯定比别人编译的好，参数更优化，而是通过这些繁琐的东西来提高对服务器性能跟参数之间关系的认识。</p>
<p>建议网友在做服务器的时候，不要按照我的默认脚本安装，因为这个脚本只注重了功能的大而全而并未关注性能和稳定，所以，本脚本只适合大家去研究，或者学习这个过程。</p>
<p>以后的版本会逐渐把一些优化的思想加入，但终归是个人的一些思想，不一定适合所有人，而且，这只是一个单机服务器的配置过程，对于大型系统是不适合的。</p>
<p>欢迎大家加入LAMP MSN 群交流 ( 加 lampper@live.cn 为msn好友)</p>
<p>顺便BS一下惠普笔记本V3000系列＋宇瞻内存，太不兼容了，以至我调试脚本的时候不断死机（调试一遍得一小时呢－－|）</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/10/27/amp-linux%e8%87%aa%e5%8a%a8%e5%ae%89%e8%a3%85%e8%84%9a%e6%9c%ac%ef%bc%88%e6%a8%a1%e5%9d%97%e6%96%b9%e5%bc%8f%e5%ae%89%e8%a3%85%ef%bc%8920%e5%8f%91%e5%b8%83.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>Linux提交命令至后台运行</title>
		<link>http://www.sunboyu.cn/2008/09/27/linux%e6%8f%90%e4%ba%a4%e5%91%bd%e4%bb%a4%e8%87%b3%e5%90%8e%e5%8f%b0%e8%bf%90%e8%a1%8c.shtml</link>
		<comments>http://www.sunboyu.cn/2008/09/27/linux%e6%8f%90%e4%ba%a4%e5%91%bd%e4%bb%a4%e8%87%b3%e5%90%8e%e5%8f%b0%e8%bf%90%e8%a1%8c.shtml#comments</comments>
		<pubDate>Sat, 27 Sep 2008 15:01:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[shell]]></category>

		<category><![CDATA[后台执行]]></category>

		<category><![CDATA[后台运行]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=330</guid>
		<description><![CDATA[我经常在putty里工作,有时候如果一个命令执行太长,不得已,我得开两个窗口,如果事情再多,可能开四个五个,不过有的ssh登陆工具可以开多个窗口,但难免会出点乱子.那么我们可以把命令隐藏再后台执行,使用linux下命令  &#8220;&#38;&#8221;  这个倒霉的符号.
比如我们要执行一个命令,(暂时没想到执行时间N长的命令,假设一个shell) test.sh , 现在提交并隐藏在后台
$./test.sh &#62;&#62; test.log &#38;
意思是,执行test.sh 反馈的结构输送至 test.log , &#38;表示这个命令提交至后台执行.
执行后,返回一个进程号,可以用ps来查看.
这样,我们可以连续在同一个终端窗口上运行多个持续的命令.
然后,问题又来.我们运行这些命令至后台后,如果想退出终端窗口,那么后台的命令也随之中断.我们得想办法让进程持续运行.这里得使用此命令 nohup
重新执行上边的操作,那么我们应该这样执行
$nohup ./test.sh &#62;&#62; test.log
然后敲logout,放心,再登陆试试ps,进程依然存在!
]]></description>
			<content:encoded><![CDATA[<p>我经常在putty里工作,有时候如果一个命令执行太长,不得已,我得开两个窗口,如果事情再多,可能开四个五个,不过有的ssh登陆工具可以开多个窗口,但难免会出点乱子.那么我们可以把命令隐藏再后台执行,使用linux下命令  &#8220;&amp;&#8221;  这个倒霉的符号.</p>
<p>比如我们要执行一个命令,(暂时没想到执行时间N长的命令,假设一个shell) test.sh , 现在提交并隐藏在后台</p>
<p>$./test.sh &gt;&gt; test.log &amp;</p>
<p>意思是,执行test.sh 反馈的结构输送至 test.log , &amp;表示这个命令提交至后台执行.</p>
<p>执行后,返回一个进程号,可以用ps来查看.</p>
<p>这样,我们可以连续在同一个终端窗口上运行多个持续的命令.</p>
<p>然后,问题又来.我们运行这些命令至后台后,如果想退出终端窗口,那么后台的命令也随之中断.我们得想办法让进程持续运行.这里得使用此命令 nohup</p>
<p>重新执行上边的操作,那么我们应该这样执行</p>
<p>$nohup ./test.sh &gt;&gt; test.log</p>
<p>然后敲logout,放心,再登陆试试ps,进程依然存在!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/09/27/linux%e6%8f%90%e4%ba%a4%e5%91%bd%e4%bb%a4%e8%87%b3%e5%90%8e%e5%8f%b0%e8%bf%90%e8%a1%8c.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>Nutch配置指南</title>
		<link>http://www.sunboyu.cn/2008/09/22/nutch%e9%85%8d%e7%bd%ae%e6%8c%87%e5%8d%97.shtml</link>
		<comments>http://www.sunboyu.cn/2008/09/22/nutch%e9%85%8d%e7%bd%ae%e6%8c%87%e5%8d%97.shtml#comments</comments>
		<pubDate>Mon, 22 Sep 2008 09:56:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=325</guid>
		<description><![CDATA[//fuck这个破鼠标，写了半天，还没报错，页面就被跳没了！！
重写：
首先，下载相关软件
tomcat   http://archive.apache.org/dist/tomcat/tomcat-4/v4.1.37/bin/apache-tomcat-4.1.37.tar.gz
nutch  http://apache.mirror.phpchina.com/lucene/nutch/nutch-0.7.2.tar.gz
jdk的配置，看这篇文章 http://www.sunboyu.cn/2008/09/20/centos5%E4%B8%8B%E9%85%8D%E7%BD%AEjdk%E7%8E%AF%E5%A2%83.shtml
顺便写了个脚本
# author:sunboyu@gmail.com
# qq:176300676 msn:sunboyu@gmail.com
# http://www.sunboyu.cn
&#160;
#!/bin/sh
export JAVA_HOME=/opt/jdk1.6.0
export CLASSPATH=.:/opt/jdk1.6.0/lib/tools.jar:/opt/jdk1.6.0/lib/dt.jar:/opt/jdk1.6.0
export PATH=$PATH:/opt/jdk1.6.0/bin
export JRE_HOME=/opt/jdk1.6.0
&#160;
export CATALINA_BASE=/opt/tomcat
export CATALINA_HOME=/opt/tomcat
export CATALINA_TMPDIR=/opt/tomcat/temp
把nutch目录下的nutch-0.7.2.war配置为tomcat下的默认站点
修改tomcat下webapps/ROOT/WEB-INF/classes/nutch-site.xml
增加以下配置
&#60;property&#62;
&#160;&#160; &#160; &#160;&#60;name&#62;searcher.dir&#60;/name&#62;
&#160;&#160; &#160; &#160;&#60;value&#62;/local/nutch/crawl&#60;/value&#62;
&#160;&#160; &#60;/property&#62;
启动tomcat!
运行以下nutch命令
bin/nutch crawl urls -dir /test -depth 5 -topN 1000 -threads 5
则可以在/test目录中创建抓取的索引。
然后在tomcat服务中测试下搜索效果！
]]></description>
			<content:encoded><![CDATA[<p>//fuck这个破鼠标，写了半天，还没报错，页面就被跳没了！！<br />
重写：<br />
首先，下载相关软件<br />
tomcat   http://archive.apache.org/dist/tomcat/tomcat-4/v4.1.37/bin/apache-tomcat-4.1.37.tar.gz<br />
nutch  http://apache.mirror.phpchina.com/lucene/nutch/nutch-0.7.2.tar.gz<br />
jdk的配置，看这篇文章 http://www.sunboyu.cn/2008/09/20/centos5%E4%B8%8B%E9%85%8D%E7%BD%AEjdk%E7%8E%AF%E5%A2%83.shtml<br />
顺便写了个脚本</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"># author:sunboyu@gmail.com</li>
<li># qq:176300676 msn:sunboyu@gmail.com</li>
<li># http://www.sunboyu.cn</li>
<li>&nbsp;</li>
<li>#!/bin/sh</li>
<li>export JAVA_HOME=/opt/jdk1.6.0</li>
<li>export CLASSPATH=.:/opt/jdk1.6.0/lib/tools.jar:/opt/jdk1.6.0/lib/dt.jar:/opt/jdk1.6.0</li>
<li>export PATH=$PATH:/opt/jdk1.6.0/bin</li>
<li>export JRE_HOME=/opt/jdk1.6.0</li>
<li>&nbsp;</li>
<li>export CATALINA_BASE=/opt/tomcat</li>
<li>export CATALINA_HOME=/opt/tomcat</li>
<li>export CATALINA_TMPDIR=/opt/tomcat/temp</li></ol></div>
<p>把nutch目录下的nutch-0.7.2.war配置为tomcat下的默认站点<br />
修改tomcat下webapps/ROOT/WEB-INF/classes/nutch-site.xml<br />
增加以下配置</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">&lt;property&gt;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp;&lt;name&gt;searcher.dir&lt;/name&gt;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp;&lt;value&gt;/local/nutch/crawl&lt;/value&gt;</li>
<li>&nbsp;&nbsp; &lt;/property&gt;</li></ol></div>
<p>启动tomcat!<br />
运行以下nutch命令<br />
bin/nutch crawl urls -dir /test -depth 5 -topN 1000 -threads 5<br />
则可以在/test目录中创建抓取的索引。<br />
然后在tomcat服务中测试下搜索效果！</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/09/22/nutch%e9%85%8d%e7%bd%ae%e6%8c%87%e5%8d%97.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>Nutch开源爬虫＋Lucene开源分词工具</title>
		<link>http://www.sunboyu.cn/2008/09/21/nutch%e5%bc%80%e6%ba%90%e7%88%ac%e8%99%ab%ef%bc%8blucene%e5%bc%80%e6%ba%90%e5%88%86%e8%af%8d%e5%b7%a5%e5%85%b7.shtml</link>
		<comments>http://www.sunboyu.cn/2008/09/21/nutch%e5%bc%80%e6%ba%90%e7%88%ac%e8%99%ab%ef%bc%8blucene%e5%bc%80%e6%ba%90%e5%88%86%e8%af%8d%e5%b7%a5%e5%85%b7.shtml#comments</comments>
		<pubDate>Sun, 21 Sep 2008 11:25:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[lucene]]></category>

		<category><![CDATA[nutch]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=324</guid>
		<description><![CDATA[Lucene是一个java写的开源分词工具，官方主页 http://lucene.apache.org/ 是apache下边的一个项目。
Lucene主要应用为分词并创建索引，提供高速的搜索服务，能讲海量的数据进行分词整理并生成轻量的数据包进行索引存储。
Lucene不是一个搜索引擎，但Lucene项目下有个子项目,Nutch爬虫。Nutch同样是基于Java的一个开源的爬虫，配合Lucene的分词索引功能，构建一个强大的开源搜索引擎。
官方Lucene已经更新到2.3.2版本http://svn.apache.org/repos/asf/lucene/java/tags/lucene_2_3_2/CHANGES.txt，Nutch已经更新到了0.9版本http://www.apache.org/dist/lucene/nutch/CHANGES-0.9.txt。
在测试中，我使用了Nutch0.7.2 http://apache.mirror.phpchina.com/lucene/nutch/nutch-0.7.2.tar.gz,比较稳定，而且对中文分词的效果也不错，能达到使用的水平，因为没有服务，只在本机做了简单测试，没有对效率进行评估，若哪位达人有闲置服务器，可借老朽一用。
]]></description>
			<content:encoded><![CDATA[<p>Lucene是一个java写的开源分词工具，官方主页 http://lucene.apache.org/ 是apache下边的一个项目。</p>
<p>Lucene主要应用为分词并创建索引，提供高速的搜索服务，能讲海量的数据进行分词整理并生成轻量的数据包进行索引存储。</p>
<p>Lucene不是一个搜索引擎，但Lucene项目下有个子项目,Nutch爬虫。Nutch同样是基于Java的一个开源的爬虫，配合Lucene的分词索引功能，构建一个强大的开源搜索引擎。</p>
<p>官方Lucene已经更新到2.3.2版本http://svn.apache.org/repos/asf/lucene/java/tags/lucene_2_3_2/CHANGES.txt，Nutch已经更新到了0.9版本http://www.apache.org/dist/lucene/nutch/CHANGES-0.9.txt。</p>
<p>在测试中，我使用了Nutch0.7.2 http://apache.mirror.phpchina.com/lucene/nutch/nutch-0.7.2.tar.gz,比较稳定，而且对中文分词的效果也不错，能达到使用的水平，因为没有服务，只在本机做了简单测试，没有对效率进行评估，若哪位达人有闲置服务器，可借老朽一用。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/09/21/nutch%e5%bc%80%e6%ba%90%e7%88%ac%e8%99%ab%ef%bc%8blucene%e5%bc%80%e6%ba%90%e5%88%86%e8%af%8d%e5%b7%a5%e5%85%b7.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>CentOS5下配置JDK环境</title>
		<link>http://www.sunboyu.cn/2008/09/20/centos5%e4%b8%8b%e9%85%8d%e7%bd%aejdk%e7%8e%af%e5%a2%83.shtml</link>
		<comments>http://www.sunboyu.cn/2008/09/20/centos5%e4%b8%8b%e9%85%8d%e7%bd%aejdk%e7%8e%af%e5%a2%83.shtml#comments</comments>
		<pubDate>Sat, 20 Sep 2008 07:25:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[原创技术]]></category>

		<category><![CDATA[java]]></category>

		<category><![CDATA[jdk]]></category>

		<category><![CDATA[环境]]></category>

		<category><![CDATA[配置]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=323</guid>
		<description><![CDATA[下载jdk安装包 http://www.java.net/download/jdk6/6u10/promoted/b32/binaries/jdk-6u10-rc2-bin-b32-linux-i586-12_sep_2008.bin
编辑/etc/profile
export JAVA_HOME=/opt/jdk1.6.0
export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
export JRE_HOME=$JAVA_HOME/jre
保存加载配置 ： source /etc/profile
然后终端用echo $PATH 监测是否成功。
最后监测 java -version
如果回显出现
java version &#8220;1.6.0_10-rc2&#8243;
Java(TM) SE Runtime Environment (build 1.6.0_10-rc2-b32)
Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode, sharing)
则证明安装成功
]]></description>
			<content:encoded><![CDATA[<p>下载jdk安装包 http://www.java.net/download/jdk6/6u10/promoted/b32/binaries/jdk-6u10-rc2-bin-b32-linux-i586-12_sep_2008.bin</p>
<p>编辑/etc/profile</p>
<p>export JAVA_HOME=/opt/jdk1.6.0<br />
export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar<br />
export PATH=$PATH:$JAVA_HOME/bin<br />
export JRE_HOME=$JAVA_HOME/jre</p>
<p>保存加载配置 ： source /etc/profile</p>
<p>然后终端用echo $PATH 监测是否成功。</p>
<p>最后监测 java -version</p>
<p>如果回显出现</p>
<p>java version &#8220;1.6.0_10-rc2&#8243;<br />
Java(TM) SE Runtime Environment (build 1.6.0_10-rc2-b32)<br />
Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode, sharing)<br />
则证明安装成功</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/09/20/centos5%e4%b8%8b%e9%85%8d%e7%bd%aejdk%e7%8e%af%e5%a2%83.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>LAMP进阶计划</title>
		<link>http://www.sunboyu.cn/2008/09/16/lamp%e8%bf%9b%e9%98%b6%e8%ae%a1%e5%88%92.shtml</link>
		<comments>http://www.sunboyu.cn/2008/09/16/lamp%e8%bf%9b%e9%98%b6%e8%ae%a1%e5%88%92.shtml#comments</comments>
		<pubDate>Tue, 16 Sep 2008 15:35:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[LAMP]]></category>

		<category><![CDATA[进阶]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=316</guid>
		<description><![CDATA[lamp进阶计划
1、Linux,Apache,Mysql,PHP最新集成安装脚本，新增优化项
eAccelerator缓冲集成
PHP的SESSION由文件切入内存
DSO模式编译php至Apache
2、PHP代码优化
OOP核心类库完善
通用功能模块的开发
]]></description>
			<content:encoded><![CDATA[<p>lamp进阶计划</p>
<p>1、Linux,Apache,Mysql,PHP最新集成安装脚本，新增优化项</p>
<p>eAccelerator缓冲集成</p>
<p>PHP的SESSION由文件切入内存</p>
<p>DSO模式编译php至Apache</p>
<p>2、PHP代码优化</p>
<p>OOP核心类库完善</p>
<p>通用功能模块的开发</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/09/16/lamp%e8%bf%9b%e9%98%b6%e8%ae%a1%e5%88%92.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>Linux下与WinRar兼容的程序，rarlinux</title>
		<link>http://www.sunboyu.cn/2008/08/11/linux%e4%b8%8b%e4%b8%8ewinrar%e5%85%bc%e5%ae%b9%e7%9a%84%e7%a8%8b%e5%ba%8f%ef%bc%8crarlinux.shtml</link>
		<comments>http://www.sunboyu.cn/2008/08/11/linux%e4%b8%8b%e4%b8%8ewinrar%e5%85%bc%e5%ae%b9%e7%9a%84%e7%a8%8b%e5%ba%8f%ef%bc%8crarlinux.shtml#comments</comments>
		<pubDate>Mon, 11 Aug 2008 09:52:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[rar]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=275</guid>
		<description><![CDATA[要做个linux下与windows兼容的加密压包与解包工具，选择了rarlinux。
从这里下载 http://www.rarlab.com/rar/rarbsd-3.8.b4.tar.gz
下载后，直接tar解压，make安装，如果想自定义安装位置，可以修改Makefile文件。如果是自定义路径，那么把路径加入到PATH中。PATH=$PATH:/path export PATH
然后可以敲命令 rar,查看帮助。
查看压缩文件列表  rar l file.rar
解压缩一个文件 rar e file.tat
压缩一个文件 rar a target.rar soursefile
压缩一个文件并且加密码 tar a -p[password] target.rar soursefile
]]></description>
			<content:encoded><![CDATA[<p>要做个linux下与windows兼容的加密压包与解包工具，选择了rarlinux。</p>
<p>从这里下载 http://www.rarlab.com/rar/rarbsd-3.8.b4.tar.gz</p>
<p>下载后，直接tar解压，make安装，如果想自定义安装位置，可以修改Makefile文件。如果是自定义路径，那么把路径加入到PATH中。PATH=$PATH:/path export PATH</p>
<p>然后可以敲命令 rar,查看帮助。</p>
<p>查看压缩文件列表  rar l file.rar</p>
<p>解压缩一个文件 rar e file.tat</p>
<p>压缩一个文件 rar a target.rar soursefile</p>
<p>压缩一个文件并且加密码 tar a -p[password] target.rar soursefile</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/08/11/linux%e4%b8%8b%e4%b8%8ewinrar%e5%85%bc%e5%ae%b9%e7%9a%84%e7%a8%8b%e5%ba%8f%ef%bc%8crarlinux.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>SVN配置使用</title>
		<link>http://www.sunboyu.cn/2008/08/09/svn%e9%85%8d%e7%bd%ae%e4%bd%bf%e7%94%a8.shtml</link>
		<comments>http://www.sunboyu.cn/2008/08/09/svn%e9%85%8d%e7%bd%ae%e4%bd%bf%e7%94%a8.shtml#comments</comments>
		<pubDate>Sat, 09 Aug 2008 08:16:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[svn]]></category>

		<category><![CDATA[配置]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=260</guid>
		<description><![CDATA[接这个 http://www.sunboyu.cn/2008/07/26/subversion-150-%E7%BC%96%E8%AF%91%E5%8F%82%E6%95%B0.shtml
安装完成后，可以建立仓库  svnadmin create /opt/$path
配置apache
&#60;Location /svn&#62;
DAV svn
SVNParentPath /opt/httpd-2.2.9/htdocs/repos
SVNListParentPath on
AuthzSVNAccessFile /opt/httpd-2.2.9/htdocs/repos/accessfile
Require valid-user
AuthType Basic
AuthName &#8220;Svn&#8221;
AuthUserFile /opt/httpd-2.2.9/htdocs/repos/passwordfile
&#60;/Location&#62;
生成password的方法 htpasswd -s /$file username
这样就可以建立一个密码文件，在httpd中调用。在调试的时候，权限是大事
]]></description>
			<content:encoded><![CDATA[<p>接这个 http://www.sunboyu.cn/2008/07/26/subversion-150-%E7%BC%96%E8%AF%91%E5%8F%82%E6%95%B0.shtml</p>
<p>安装完成后，可以建立仓库  svnadmin create /opt/$path</p>
<p>配置apache</p>
<p>&lt;Location /svn&gt;<br />
DAV svn<br />
SVNParentPath /opt/httpd-2.2.9/htdocs/repos<br />
SVNListParentPath on<br />
AuthzSVNAccessFile /opt/httpd-2.2.9/htdocs/repos/accessfile<br />
Require valid-user<br />
AuthType Basic<br />
AuthName &#8220;Svn&#8221;<br />
AuthUserFile /opt/httpd-2.2.9/htdocs/repos/passwordfile<br />
&lt;/Location&gt;</p>
<p>生成password的方法 htpasswd -s /$file username</p>
<p>这样就可以建立一个密码文件，在httpd中调用。在调试的时候，权限是大事</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/08/09/svn%e9%85%8d%e7%bd%ae%e4%bd%bf%e7%94%a8.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>VIM安装使用</title>
		<link>http://www.sunboyu.cn/2008/08/03/vim%e5%ae%89%e8%a3%85%e4%bd%bf%e7%94%a8.shtml</link>
		<comments>http://www.sunboyu.cn/2008/08/03/vim%e5%ae%89%e8%a3%85%e4%bd%bf%e7%94%a8.shtml#comments</comments>
		<pubDate>Sun, 03 Aug 2008 07:37:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[vim]]></category>

		<category><![CDATA[安装]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=240</guid>
		<description><![CDATA[http://www.vim.org/
VIM，不错的编辑器，安装试试
http://www.vim.org/download.php
下载解压， tar -jxvf **.tar.bz2
./configure &#8211;with-tlib=ncurses  安装
如果报错，需要补充一个库  yum install ncurses ncurses-devel
vim手册  http://vcd.gro.clinux.org/
安装后，可以直接使用命令 vim
vim大体上跟vi编辑器一样，但增加了好多命令。
我比较喜欢的是高亮功能。
]]></description>
			<content:encoded><![CDATA[<p>http://www.vim.org/<br />
VIM，不错的编辑器，安装试试<br />
http://www.vim.org/download.php<br />
下载解压， tar -jxvf **.tar.bz2</p>
<p>./configure &#8211;with-tlib=ncurses  安装</p>
<p>如果报错，需要补充一个库  yum install ncurses ncurses-devel</p>
<p>vim手册  http://vcd.gro.clinux.org/</p>
<p>安装后，可以直接使用命令 vim</p>
<p>vim大体上跟vi编辑器一样，但增加了好多命令。</p>
<p>我比较喜欢的是高亮功能。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/08/03/vim%e5%ae%89%e8%a3%85%e4%bd%bf%e7%94%a8.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>subversion-1.5.0 编译参数</title>
		<link>http://www.sunboyu.cn/2008/07/26/subversion-150-%e7%bc%96%e8%af%91%e5%8f%82%e6%95%b0.shtml</link>
		<comments>http://www.sunboyu.cn/2008/07/26/subversion-150-%e7%bc%96%e8%af%91%e5%8f%82%e6%95%b0.shtml#comments</comments>
		<pubDate>Sat, 26 Jul 2008 05:39:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[subversion]]></category>

		<category><![CDATA[svn]]></category>

		<category><![CDATA[参数]]></category>

		<category><![CDATA[编译]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=224</guid>
		<description><![CDATA[./configure &#8211;prefix=/opt/subversion &#8211;disable-all-static &#8211;with-apxs=/opt/httpd-2.2.9/bin/apxs &#8211;with-apr=/opt/httpd-2.2.9/bin/apr-1-config &#8211;with-apr-util=/opt/httpd-2.2.9/bin/apu-1-config &#8211;with-serf=/opt/httpd-2.2.9 &#8211;with-ssl &#8211;with-zlib=/usr/local &#8211;enable-dso &#8211;enable-mod-activation
如果编译不能通过，可能要安装 expat-1.95.8-8.2.1.i386.rpm expat-devel-1.95.8-8.2.1.i386.rpm 偷懒，直接rpm了
还有，dlname的问题，装这个 http://ftp.gnu.org/gnu/libtool/libtool-2.2.tar.gz
更正版 subversion1.5.0版本测试
./configure &#8211;prefix=/opt/subversion &#8211;disable-all-static &#8211;with-apxs=/opt/httpd-2.2.9/bin/apxs &#8211;with-apr=/opt/httpd-2.2.9/bin/apr-1-config &#8211;with-apr-util=/opt/httpd-2.2.9/bin/apu-1-config &#8211;with-serf=/opt/httpd-2.2.9 &#8211;with-ssl &#8211;with-zlib=/usr/local &#8211;enable-mod-activation &#8211;enable-runtime-module-search
./configure &#8211;prefix=/opt/subversion &#8211;disable-all-static &#8211;with-apxs=/opt/httpd-2.2.9/bin/apxs &#8211;with-apr=/opt/httpd-2.2.9/bin/apr-1-config &#8211;with-apr-util=/opt/httpd-2.2.9/bin/apu-1-config &#8211;with-serf=/opt/httpd-2.2.9 &#8211;with-ssl &#8211;with-zlib=/usr/local &#8211;enable-mod-activation &#8211;enable-runtime-module-search &#8211;enable-subdir-config &#8211;enable-experimental-libtool &#8211;enable-fast-install
]]></description>
			<content:encoded><![CDATA[<p>./configure &#8211;prefix=/opt/subversion &#8211;disable-all-static &#8211;with-apxs=/opt/httpd-2.2.9/bin/apxs &#8211;with-apr=/opt/httpd-2.2.9/bin/apr-1-config &#8211;with-apr-util=/opt/httpd-2.2.9/bin/apu-1-config &#8211;with-serf=/opt/httpd-2.2.9 &#8211;with-ssl &#8211;with-zlib=/usr/local &#8211;enable-dso &#8211;enable-mod-activation</p>
<p>如果编译不能通过，可能要安装 expat-1.95.8-8.2.1.i386.rpm expat-devel-1.95.8-8.2.1.i386.rpm 偷懒，直接rpm了</p>
<p>还有，dlname的问题，装这个 http://ftp.gnu.org/gnu/libtool/libtool-2.2.tar.gz<br />
更正版 subversion1.5.0版本测试<br />
./configure &#8211;prefix=/opt/subversion &#8211;disable-all-static &#8211;with-apxs=/opt/httpd-2.2.9/bin/apxs &#8211;with-apr=/opt/httpd-2.2.9/bin/apr-1-config &#8211;with-apr-util=/opt/httpd-2.2.9/bin/apu-1-config &#8211;with-serf=/opt/httpd-2.2.9 &#8211;with-ssl &#8211;with-zlib=/usr/local &#8211;enable-mod-activation &#8211;enable-runtime-module-search</p>
<p>./configure &#8211;prefix=/opt/subversion &#8211;disable-all-static &#8211;with-apxs=/opt/httpd-2.2.9/bin/apxs &#8211;with-apr=/opt/httpd-2.2.9/bin/apr-1-config &#8211;with-apr-util=/opt/httpd-2.2.9/bin/apu-1-config &#8211;with-serf=/opt/httpd-2.2.9 &#8211;with-ssl &#8211;with-zlib=/usr/local &#8211;enable-mod-activation &#8211;enable-runtime-module-search &#8211;enable-subdir-config &#8211;enable-experimental-libtool &#8211;enable-fast-install</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/07/26/subversion-150-%e7%bc%96%e8%af%91%e5%8f%82%e6%95%b0.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>sunboyu-amp-mod-V1.0 alpha</title>
		<link>http://www.sunboyu.cn/2008/07/26/sunboyu-amp-mod-v10-alpha.shtml</link>
		<comments>http://www.sunboyu.cn/2008/07/26/sunboyu-amp-mod-v10-alpha.shtml#comments</comments>
		<pubDate>Sat, 26 Jul 2008 05:37:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[APACHE]]></category>

		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[MYSQL]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[amp]]></category>

		<category><![CDATA[mod]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=222</guid>
		<description><![CDATA[重新做了个模块版的，这次apache使用动态编译
sunboyu-amp-isapi-v10-alpha
]]></description>
			<content:encoded><![CDATA[<p>重新做了个模块版的，这次apache使用动态编译</p>
<p><a href="http://www.sunboyu.cn/upfiles/2008/07/sunboyu-amp-isapi-v10-alpha.txt">sunboyu-amp-isapi-v10-alpha</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/07/26/sunboyu-amp-mod-v10-alpha.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>sunboyu-amp-fastcgi-V1.0 Alpha版本发布</title>
		<link>http://www.sunboyu.cn/2008/07/24/sunboyu-amp-fastcgi-v10-alpha%e7%89%88%e6%9c%ac%e5%8f%91%e5%b8%83.shtml</link>
		<comments>http://www.sunboyu.cn/2008/07/24/sunboyu-amp-fastcgi-v10-alpha%e7%89%88%e6%9c%ac%e5%8f%91%e5%b8%83.shtml#comments</comments>
		<pubDate>Thu, 24 Jul 2008 06:04:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[APACHE]]></category>

		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[MYSQL]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[alpha]]></category>

		<category><![CDATA[amp]]></category>

		<category><![CDATA[fastcgi]]></category>

		<category><![CDATA[LAMP]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=218</guid>
		<description><![CDATA[sunboyu-amp-fastcgi-v10-alpha
基本都配置完毕了，但整体流程没有彻底自动化，适当的时候会作出stable版本。
# author:sunboyu@gmail.com
# qq:176300676 msn:sunboyu@gmail.com
# http://www.sunboyu.cn
#!/bin/sh
h_path = &#8220;/root/&#8221;
url=&#8221;http://www.sunboyu.cn/sourse/&#8221;
install_dir=&#8221;/opt/&#8221;
mkdir $install_dir
termcap_sourse_name=&#8221;termcap-1.3.1&#8243;
mysql_sourse_name=&#8221;mysql-5.0.22&#8243;
mysql_install_dir=$install_dir$mysql_sourse_name
openssl_sourse_name=&#8221;openssl-0.9.8g&#8221;
openssl_install_dir=$install_dir$openssl_sourse_name
httpd_sourse_name=&#8221;httpd-2.2.9&#8243;
httpd_install_dir=$install_dir$httpd_sourse_name
fastcgi_sourse_name=&#8221;mod_fastcgi-2.4.6&#8243;
fastcgi_install_dir=$install_dir$fastcgi_sourse_name
fcgid_sourse_name=&#8221;mod_fcgid.2.2&#8243;
libxml2_sourse_name=&#8221;libxml2-2.6.30&#8243;
libxml2_install_dir=$install_dir$libxml2_sourse_name
zlib_sourse_name=&#8221;zlib-1.2.3&#8243;
jpeg_sourse_name=&#8221;jpegsrc.v6b&#8221;
jpeg_install_dir=$install_dir$jpeg_sourse_name
libpng_sourse_name=&#8221;libpng-1.2.29&#8243;
libpng_install_dir=$install_dir$libpng_sourse_name
freetype_sourse_name=&#8221;freetype-2.3.7&#8243;
freetype_install_dir=$install_dir$freetype_sourse_name
php_sourse_name=&#8221;php-5.2.6&#8243;
php_install_dir=$install_dir$php_sourse_name
gd_sourse_name=&#8221;gd-2.0.36RC1&#8243;
gd_install_dir=$install_dir$gd_sourse_name
###MYSQL依赖库
wget ${url}${termcap_sourse_name}&#8221;.tar.gz&#8221;
tar -zxvf $termcap_sourse_name&#8221;.tar.gz&#8221;
cd $termcap_sourse_name
./configure
make &#38;&#38; make install
cd ..
#rm -rf ${termcap_sourse_name}*
###openssl
wget ${url}${openssl_sourse_name}&#8221;.tar.gz&#8221;
tar -zxvf $openssl_sourse_name&#8221;.tar.gz&#8221;
cd $openssl_sourse_name
./Configure &#8211;prefix=$openssl_install_dir
make &#38;&#38; make install
cd ..
#rm -rf ${openssl_sourse_name}*
###libxml
wget ${url}${libxml2_sourse_name}&#8221;.tar.gz&#8221;
tar -zxvf $libxml2_sourse_name&#8221;.tar.gz&#8221;
cd $libxml2_sourse_name
./configure &#8211;prefix=$libxml2_install_dir
make &#38;&#38; make install
cd ..
#rm -rf ${libxml2_sourse_name}*
###zlib
wget ${url}${zlib_sourse_name}&#8221;.tar.gz&#8221;
tar -zxvf $zlib_sourse_name&#8221;.tar.gz&#8221;
cd $zlib_sourse_name
./configure
make &#38;&#38; make install
cd ..
cp /usr/lib/libz.so.1 /usr/lib/libz.so
#rm -rf ${zlib_sourse_name}*
###jpeg
wget ${url}${jpeg_sourse_name}&#8221;.tar.gz&#8221;
tar -zxvf $jpeg_sourse_name&#8221;.tar.gz&#8221;
cd [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sunboyu.cn/upfiles/2008/07/sunboyu-amp-fastcgi-v10-alpha.txt">sunboyu-amp-fastcgi-v10-alpha</a></p>
<p>基本都配置完毕了，但整体流程没有彻底自动化，适当的时候会作出stable版本。<br />
# author:sunboyu@gmail.com<br />
# qq:176300676 msn:sunboyu@gmail.com<br />
# http://www.sunboyu.cn</p>
<p>#!/bin/sh<br />
h_path = &#8220;/root/&#8221;<br />
url=&#8221;http://www.sunboyu.cn/sourse/&#8221;<br />
install_dir=&#8221;/opt/&#8221;<br />
mkdir $install_dir</p>
<p>termcap_sourse_name=&#8221;termcap-1.3.1&#8243;</p>
<p>mysql_sourse_name=&#8221;mysql-5.0.22&#8243;<br />
mysql_install_dir=$install_dir$mysql_sourse_name</p>
<p>openssl_sourse_name=&#8221;openssl-0.9.8g&#8221;<br />
openssl_install_dir=$install_dir$openssl_sourse_name</p>
<p>httpd_sourse_name=&#8221;httpd-2.2.9&#8243;<br />
httpd_install_dir=$install_dir$httpd_sourse_name</p>
<p>fastcgi_sourse_name=&#8221;mod_fastcgi-2.4.6&#8243;<br />
fastcgi_install_dir=$install_dir$fastcgi_sourse_name</p>
<p>fcgid_sourse_name=&#8221;mod_fcgid.2.2&#8243;</p>
<p>libxml2_sourse_name=&#8221;libxml2-2.6.30&#8243;<br />
libxml2_install_dir=$install_dir$libxml2_sourse_name</p>
<p>zlib_sourse_name=&#8221;zlib-1.2.3&#8243;</p>
<p>jpeg_sourse_name=&#8221;jpegsrc.v6b&#8221;<br />
jpeg_install_dir=$install_dir$jpeg_sourse_name</p>
<p>libpng_sourse_name=&#8221;libpng-1.2.29&#8243;<br />
libpng_install_dir=$install_dir$libpng_sourse_name</p>
<p>freetype_sourse_name=&#8221;freetype-2.3.7&#8243;<br />
freetype_install_dir=$install_dir$freetype_sourse_name</p>
<p>php_sourse_name=&#8221;php-5.2.6&#8243;<br />
php_install_dir=$install_dir$php_sourse_name</p>
<p>gd_sourse_name=&#8221;gd-2.0.36RC1&#8243;<br />
gd_install_dir=$install_dir$gd_sourse_name</p>
<p>###MYSQL依赖库<br />
wget ${url}${termcap_sourse_name}&#8221;.tar.gz&#8221;<br />
tar -zxvf $termcap_sourse_name&#8221;.tar.gz&#8221;<br />
cd $termcap_sourse_name<br />
./configure<br />
make &amp;&amp; make install<br />
cd ..<br />
#rm -rf ${termcap_sourse_name}*<br />
###openssl<br />
wget ${url}${openssl_sourse_name}&#8221;.tar.gz&#8221;<br />
tar -zxvf $openssl_sourse_name&#8221;.tar.gz&#8221;<br />
cd $openssl_sourse_name<br />
./Configure &#8211;prefix=$openssl_install_dir<br />
make &amp;&amp; make install<br />
cd ..<br />
#rm -rf ${openssl_sourse_name}*<br />
###libxml<br />
wget ${url}${libxml2_sourse_name}&#8221;.tar.gz&#8221;<br />
tar -zxvf $libxml2_sourse_name&#8221;.tar.gz&#8221;<br />
cd $libxml2_sourse_name<br />
./configure &#8211;prefix=$libxml2_install_dir<br />
make &amp;&amp; make install<br />
cd ..<br />
#rm -rf ${libxml2_sourse_name}*<br />
###zlib<br />
wget ${url}${zlib_sourse_name}&#8221;.tar.gz&#8221;<br />
tar -zxvf $zlib_sourse_name&#8221;.tar.gz&#8221;<br />
cd $zlib_sourse_name<br />
./configure<br />
make &amp;&amp; make install<br />
cd ..<br />
cp /usr/lib/libz.so.1 /usr/lib/libz.so<br />
#rm -rf ${zlib_sourse_name}*<br />
###jpeg<br />
wget ${url}${jpeg_sourse_name}&#8221;.tar.gz&#8221;<br />
tar -zxvf $jpeg_sourse_name&#8221;.tar.gz&#8221;<br />
cd jpeg-6b<br />
./configure<br />
mkdir /usr/local/man/<br />
mkdir /usr/local/man/man1/<br />
mkdir /usr/local/man/man1/cjpeg/<br />
make &amp;&amp; make install<br />
cp /usr/lib/libjpeg.so.62 /usr/lib/libjpeg.so<br />
cp jpeglib.h /usr/include/jpeglib.h<br />
cp jconfig.h /usr/include/jconfig.h<br />
cp jmorecfg.h /usr/include/jmorecfg.h<br />
cp jerror.h /usr/include/jerror.h<br />
cd ..<br />
#rm -rf ${jpeg_sourse_name}.tar.gz<br />
#rm -rf jpeg-6b<br />
###png<br />
wget ${url}${libpng_sourse_name}&#8221;.tar.gz&#8221;<br />
tar -zxvf $libpng_sourse_name&#8221;.tar.gz&#8221;<br />
cd $libpng_sourse_name<br />
./configure &#8211;prefix=$libpng_install_dir<br />
make &amp;&amp; make install<br />
cp png* /usr/include/<br />
cd ..<br />
#rm -rf ${libpng_sourse_name}*<br />
###freetype<br />
wget ${url}${freetype_sourse_name}&#8221;.tar.gz&#8221;<br />
tar -zxvf $freetype_sourse_name&#8221;.tar.gz&#8221;<br />
cd $freetype_sourse_name<br />
./configure &#8211;prefix=$freetype_install_dir<br />
make &amp;&amp; make install<br />
cd ..<br />
#rm -rf ${freetype_sourse_name}*<br />
###GD2<br />
wget ${url}${gd_sourse_name}&#8221;.tar.gz&#8221;<br />
tar -zxvf $gd_sourse_name&#8221;.tar.gz&#8221;<br />
cd $gd_sourse_name<br />
./configure &#8211;prefix=$gd_install_dir &#8211;with-png=/opt/libpng-1.2.29 &#8211;with-freetype=/opt/freetype-2.3.7 &#8211;with-jpeg=/usr/lib/libjpeg.so<br />
make &amp;&amp; make install<br />
cd ..<br />
#rm -rf ${gd_sourse_name}*<br />
###MYSQL<br />
groupadd mysql<br />
useradd -g mysql mysql<br />
wget ${url}${mysql_sourse_name}&#8221;.tar.gz&#8221;<br />
tar -zxvf $mysql_sourse_name&#8221;.tar.gz&#8221;<br />
cd $mysql_sourse_name<br />
./configure &#8211;prefix=$mysql_install_dir &#8211;without-debug &#8211;with-unix-socket-path=/tmp/mysql.sock &#8211;with-client-ldflags=-all-static &#8211;with-mysqld-ldflags=-all-static &#8211;enable-local-infile &#8211;enable-largefile &#8211;with-charset=utf8 &#8211;with-pic &#8211;with-mysqld-libs &#8211;with-comment &#8211;with-query-cache &#8211;with-bench &#8211;with-big-tables &#8211;with-innodb &#8211;with-mysqld-use=mysql<br />
make &amp;&amp; make install<br />
cp ./support-files/my-medium.cnf /etc/my.cnf<br />
cp ./support-files/mysql.server /etc/init.d/mysqld<br />
cd ..<br />
#mkdir $mysql_install_dir/var/<br />
#$mysql_install_dir/bin/mysql_install_db &#8211;user=mysql &amp;<br />
#$mysql_install_dir/bin/mysqld_safe &#8211;user=mysql &amp;</p>
<p>echo ${mysql_install_dir}&#8221;/bin/mysqld_safe &#8211;user=mysql &amp;&#8221;&gt;&gt;/etc/rc.local<br />
#rm -rf ${mysql_sourse_name}*<br />
###APACHE<br />
wget ${url}${httpd_sourse_name}&#8221;.tar.gz&#8221;<br />
tar -zxvf $httpd_sourse_name&#8221;.tar.gz&#8221;<br />
cd $httpd_sourse_name<br />
./configure &#8211;prefix=$httpd_install_dir &#8211;enable-authz-dbm &#8211;enable-log-config &#8211;enable-headers &#8211;enable-setenvif &#8211;with-ssl=$openssl_install_dir &#8211;enable-static-ab &#8211;enable-http &#8211;enable-mime &#8211;enable-status &#8211;enable-suexec &#8211;enable-vhost-alias &#8211;enable-dir &#8211;enable-rewrite &#8211;with-mpm=worker<br />
make &amp;&amp; make install<br />
cd ..<br />
ln -s $httpd_install_dir/bin/apachectl /etc/init.d/httpd<br />
echo $httpd_install_dir/bin/apachectl start&gt;&gt;/etc/rc.local<br />
chkconfig &#8211;level 345 httpd on<br />
#rm -rf ${httpd_sourse_name}*<br />
###fastcgi<br />
wget ${url}${fastcgi_sourse_name}&#8221;.tar.gz&#8221;<br />
tar -zxvf $fastcgi_sourse_name&#8221;.tar.gz&#8221;<br />
cd $fastcgi_sourse_name<br />
sed &#8217;s/\/usr\/local\/apache2/\/opt\/httpd-2.2.9\//g&#8217; Makefile.AP2 &gt; Makefile<br />
make &amp;&amp; make install<br />
cd ..<br />
###fcgid<br />
wget ${url}${fcgid_sourse_name}&#8221;.tgz&#8221;<br />
tar -zxvf $fcgid_sourse_name&#8221;.tgz&#8221;<br />
cd $fcgid_sourse_name<br />
mv Makefile Makefile.AP2<br />
sed &#8217;s/\/usr\/local\/apache2/\/opt\/httpd-2.2.9\//g&#8217; Makefile.AP2 &gt; Makefile<br />
make &amp;&amp; make install<br />
cd ..<br />
echo LoadModule fcgid_module modules/mod_fcgid.so&gt;&gt;$httpd_install_dir/conf/httpd.conf<br />
echo AddHandler fcgid-script .php&gt;&gt;$httpd_install_dir/conf/httpd.conf<br />
echo &#8220;FCGIWrapper &#8220;${php_install_dir}&#8221;/bin/php-cgi .php&#8221;&gt;&gt;$httpd_install_dir/conf/httpd.conf<br />
#rm -rf ${fastcgi_sourse_name}*<br />
###PHP<br />
wget ${url}${php_sourse_name}&#8221;.tar.gz&#8221;<br />
tar -zxvf $php_sourse_name&#8221;.tar.gz&#8221;<br />
cd $php_sourse_name<br />
cp php.ini-dist php.ini<br />
./configure &#8211;prefix=$php_install_dir &#8211;with-libxml-dir=$libxml2_install_dir &#8211;enable-cli &#8211;enable-cgi &#8211;enable-fastcgi &#8211;enable-force-cgi-redirect &#8211;enable-discard-path &#8211;enable-path-info-check &#8211;with-openssl &#8211;with-pcre-regex &#8211;enable-calendar &#8211;enable-dom &#8211;enable-ftp &#8211;with-openssl-dir=/usr/local/ssl &#8211;enable-gd-jis-conv &#8211;enable-hash &#8211;with-iconv &#8211;enable-json &#8211;enable-mbstring &#8211;enable-mbregex &#8211;enable-pdo &#8211;enable-posix &#8211;enable-libxml=$xml2_install_dir &#8211;enable-simplexml &#8211;with-sqlite &#8211;enable-tokenizer &#8211;enable-xmlreader &#8211;enable-xmlwriter &#8211;with-zlib &#8211;with-freetype-dir=$freetype_install_dir &#8211;with-gd=$gd_install_dir &#8211;with-jpeg-dir=/usr/lib/libjpeg.so &#8211;with-libpng-dir=/opt/libpng-1.2.29/lib/libpng12.so &#8211;with-zlib-dir=/usr/lib/libz.so &#8211;with-mime-magic &#8211;with-mysql=$mysql_install_dir &#8211;with-zlib-dir=/usr/lib/libz.so &#8211;with-pdo-mysql=$mysql_install_dir &#8211;with-pdo-sqlite &#8211;enable-posix &#8211;enable-soap<br />
make &amp;&amp; make install<br />
cp php.ini $php_install_dir/lib/<br />
cd ..<br />
$mysql_install_dir/bin/mysql_install_db &#8211;user=mysql &amp;</p>
<p>service httpd start<br />
service mysqld start</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/07/24/sunboyu-amp-fastcgi-v10-alpha%e7%89%88%e6%9c%ac%e5%8f%91%e5%b8%83.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>amp-fastcgi版本基本完成，部分配置未做兼容性测试</title>
		<link>http://www.sunboyu.cn/2008/07/23/amp-fastcgi%e7%89%88%e6%9c%ac%e5%9f%ba%e6%9c%ac%e5%ae%8c%e6%88%90%ef%bc%8c%e9%83%a8%e5%88%86%e9%85%8d%e7%bd%ae%e6%9c%aa%e5%81%9a%e5%85%bc%e5%ae%b9%e6%80%a7%e6%b5%8b%e8%af%95.shtml</link>
		<comments>http://www.sunboyu.cn/2008/07/23/amp-fastcgi%e7%89%88%e6%9c%ac%e5%9f%ba%e6%9c%ac%e5%ae%8c%e6%88%90%ef%bc%8c%e9%83%a8%e5%88%86%e9%85%8d%e7%bd%ae%e6%9c%aa%e5%81%9a%e5%85%bc%e5%ae%b9%e6%80%a7%e6%b5%8b%e8%af%95.shtml#comments</comments>
		<pubDate>Wed, 23 Jul 2008 15:23:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[amp]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=214</guid>
		<description><![CDATA[autoamp-fastcgi
底下要做一个模块安装php的版本
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sunboyu.cn/upfiles/2008/07/autoamp-fastcgi.rar">autoamp-fastcgi</a></p>
<p>底下要做一个模块安装php的版本</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/07/23/amp-fastcgi%e7%89%88%e6%9c%ac%e5%9f%ba%e6%9c%ac%e5%ae%8c%e6%88%90%ef%bc%8c%e9%83%a8%e5%88%86%e9%85%8d%e7%bd%ae%e6%9c%aa%e5%81%9a%e5%85%bc%e5%ae%b9%e6%80%a7%e6%b5%8b%e8%af%95.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>Apache2 PHP5 FastCgi配置终于完成</title>
		<link>http://www.sunboyu.cn/2008/07/23/apache2-php5-fastcgi%e9%85%8d%e7%bd%ae%e7%bb%88%e4%ba%8e%e5%ae%8c%e6%88%90.shtml</link>
		<comments>http://www.sunboyu.cn/2008/07/23/apache2-php5-fastcgi%e9%85%8d%e7%bd%ae%e7%bb%88%e4%ba%8e%e5%ae%8c%e6%88%90.shtml#comments</comments>
		<pubDate>Wed, 23 Jul 2008 14:12:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[APACHE]]></category>

		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[fastcgi]]></category>

		<category><![CDATA[fcgid]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=213</guid>
		<description><![CDATA[这次是使用的mod_fastcgi的一个替代品：fcgid http://fastcgi.coremail.cn/ 在功能上完全可以取代fastcgi,在性能和稳定性上还优于fastcgi（据说），不过配置起来也比fastcgi的简单，只需要加上 loadmodule fcgid_module SetHandler fcgid-script
FCGIWrapper /usr/local/bin/php-cgi .php 即可。
权限方面，呵呵，还没有测试。留档，加到我的amp的shell里。
LoadModule fcgid_module modules/mod_fcgid.so
AddHandler fcgid-script .php
FCGIWrapper /opt/php5/bin/php-cgi .php
]]></description>
			<content:encoded><![CDATA[<p>这次是使用的mod_fastcgi的一个替代品：fcgid http://fastcgi.coremail.cn/ 在功能上完全可以取代fastcgi,在性能和稳定性上还优于fastcgi（据说），不过配置起来也比fastcgi的简单，只需要加上 loadmodule fcgid_module SetHandler fcgid-script<br />
FCGIWrapper /usr/local/bin/php-cgi .php 即可。<br />
权限方面，呵呵，还没有测试。留档，加到我的amp的shell里。</p>
<p>LoadModule fcgid_module modules/mod_fcgid.so<br />
AddHandler fcgid-script .php<br />
FCGIWrapper /opt/php5/bin/php-cgi .php</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/07/23/apache2-php5-fastcgi%e9%85%8d%e7%bd%ae%e7%bb%88%e4%ba%8e%e5%ae%8c%e6%88%90.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>amp自动安装脚本安装部分已经完成</title>
		<link>http://www.sunboyu.cn/2008/07/22/amp%e8%87%aa%e5%8a%a8%e5%ae%89%e8%a3%85%e8%84%9a%e6%9c%ac%e5%ae%89%e8%a3%85%e9%83%a8%e5%88%86%e5%b7%b2%e7%bb%8f%e5%ae%8c%e6%88%90.shtml</link>
		<comments>http://www.sunboyu.cn/2008/07/22/amp%e8%87%aa%e5%8a%a8%e5%ae%89%e8%a3%85%e8%84%9a%e6%9c%ac%e5%ae%89%e8%a3%85%e9%83%a8%e5%88%86%e5%b7%b2%e7%bb%8f%e5%ae%8c%e6%88%90.shtml#comments</comments>
		<pubDate>Tue, 22 Jul 2008 04:04:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[APACHE]]></category>

		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[MYSQL]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[apm]]></category>

		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=207</guid>
		<description><![CDATA[做个版本存档
myshell_demo
]]></description>
			<content:encoded><![CDATA[<p>做个版本存档</p>
<p><a href="http://www.sunboyu.cn/upfiles/2008/07/myshell_demo1e5ae8ce7be8ee78988.rar">myshell_demo</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/07/22/amp%e8%87%aa%e5%8a%a8%e5%ae%89%e8%a3%85%e8%84%9a%e6%9c%ac%e5%ae%89%e8%a3%85%e9%83%a8%e5%88%86%e5%b7%b2%e7%bb%8f%e5%ae%8c%e6%88%90.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>gd库的编译配置－临时笔记</title>
		<link>http://www.sunboyu.cn/2008/07/18/gd%e5%ba%93%e7%9a%84%e7%bc%96%e8%af%91%e9%85%8d%e7%bd%ae%ef%bc%8d%e4%b8%b4%e6%97%b6%e7%ac%94%e8%ae%b0.shtml</link>
		<comments>http://www.sunboyu.cn/2008/07/18/gd%e5%ba%93%e7%9a%84%e7%bc%96%e8%af%91%e9%85%8d%e7%bd%ae%ef%bc%8d%e4%b8%b4%e6%97%b6%e7%ac%94%e8%ae%b0.shtml#comments</comments>
		<pubDate>Fri, 18 Jul 2008 02:23:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=201</guid>
		<description><![CDATA[./configure &#8211;with-jpeg-dir=/usr/lib/libjpeg.so -with-png=/usr/lib/libpng.so &#8211;with-freetype=/opt/freetype-2.3.7
前提 cp jpeglib.h /usr/include/jpeglib.h
[root@localhost jpeg-6b]# cp jconfig.h /usr/include/jconfig.h
[root@localhost jpeg-6b]# cp jmorecfg.h /usr/include/jmorecfg.h
[root@localhost jpeg-6b]# cp jerror.h /usr/include/jerror.h
cp png* /usr/include/
网上看了好多，结果都不对，倒是一个写python的哥们的笔记提醒了我。
那些缺失的库其实都在源码包里，只不过安装的时候没有复制到系统库目录下，手工拷贝过去就可以了。
检查一下configure，是不是有参数，指定是否拷贝.
]]></description>
			<content:encoded><![CDATA[<p>./configure &#8211;with-jpeg-dir=/usr/lib/libjpeg.so -with-png=/usr/lib/libpng.so &#8211;with-freetype=/opt/freetype-2.3.7</p>
<p>前提 cp jpeglib.h /usr/include/jpeglib.h<br />
[root@localhost jpeg-6b]# cp jconfig.h /usr/include/jconfig.h<br />
[root@localhost jpeg-6b]# cp jmorecfg.h /usr/include/jmorecfg.h<br />
[root@localhost jpeg-6b]# cp jerror.h /usr/include/jerror.h</p>
<p>cp png* /usr/include/</p>
<p>网上看了好多，结果都不对，倒是一个写python的哥们的笔记提醒了我。<br />
那些缺失的库其实都在源码包里，只不过安装的时候没有复制到系统库目录下，手工拷贝过去就可以了。<br />
检查一下configure，是不是有参数，指定是否拷贝.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/07/18/gd%e5%ba%93%e7%9a%84%e7%bc%96%e8%af%91%e9%85%8d%e7%bd%ae%ef%bc%8d%e4%b8%b4%e6%97%b6%e7%ac%94%e8%ae%b0.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>LAMP自动安装脚本</title>
		<link>http://www.sunboyu.cn/2008/07/15/lamp%e8%87%aa%e5%8a%a8%e5%ae%89%e8%a3%85%e8%84%9a%e6%9c%ac.shtml</link>
		<comments>http://www.sunboyu.cn/2008/07/15/lamp%e8%87%aa%e5%8a%a8%e5%ae%89%e8%a3%85%e8%84%9a%e6%9c%ac.shtml#comments</comments>
		<pubDate>Tue, 15 Jul 2008 15:08:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[APACHE]]></category>

		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[MYSQL]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[LAMP]]></category>

		<category><![CDATA[shell]]></category>

		<category><![CDATA[自动脚本]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=200</guid>
		<description><![CDATA[mysql，apache的基本搞定了，php的还有很多问题，先放出这些代码，方便自己操作。PHP部分正在调试。
#!/bin/sh
h_path = &#8220;/root/&#8221;
url=&#8221;http://www.sunboyu.cn/sourse/&#8221;
install_dir=&#8221;/opt/&#8221;
mkdir $install_dir
termcap_sourse_name=&#8221;termcap-1.3.1&#8243;
mysql_sourse_name=&#8221;mysql-5.0.22&#8243;
mysql_install_dir=$install_dir$mysql_sourse_name
openssl_sourse_name=&#8221;openssl-0.9.8g&#8221;
openssl_install_dir=$install_dir$openssl_sourse_name
httpd_sourse_name=&#8221;httpd-2.2.9&#8243;
httpd_install_dir=$install_dir$httpd_sourse_name
fastcgi_sourse_name=&#8221;mod_fastcgi-2.4.6&#8243;
fastcgi_install_dir=$install_dir$fastcgi_sourse_name
libxml2_sourse_name=&#8221;libxml2-2.6.30&#8243;
libxml2_install_dir=$install_dir$libxml2_sourse_name
zlib_sourse_name=&#8221;zlib-1.2.3&#8243;
zlib_install_dir=$install_dir$zlib_sourse_name
jpeg_sourse_name=&#8221;jpegsrc.v6b&#8221;
jpeg_install_dir=$install_dir$jpeg_sourse_name
libpng_sourse_name=&#8221;libpng-1.2.29&#8243;
libpng_install_dir=$install_dir$libpng_sourse_name
freetype_sourse_name=&#8221;freetype-2.3.7&#8243;
freetype_install_dir=$install_dir$freetype_sourse_name
php_sourse_name=&#8221;php-5.2.6&#8243;
php_install_dir=$install_dir$php_sourse_name
###MYSQL
wget ${url}${termcap_sourse_name}&#8221;.tar.gz&#8221;
tar -zxvf $termcap_sourse_name&#8221;.tar.gz&#8221;
cd $termcap_sourse_name
./configure
make &#38;&#38; make install
cd ..
rm -rf ${termcap_sourse_name}*
groupadd mysql
useradd -g mysql mysql
wget ${url}${mysql_sourse_name}&#8221;.tar.gz&#8221;
tar -zxvf $mysql_sourse_name&#8221;.tar.gz&#8221;
cd $mysql_sourse_name
./configure &#8211;prefix=$mysql_install_dir &#8211;enable-thread-safe-client &#8211;enable-local-infile &#8211;enable-largefile &#8211;with-charset=utf8 &#8211;with-uca &#8211;with-gnu-ld &#8211;with-pic &#8211;with-mysqld-libs &#8211;with-comment &#8211;with-query-cache &#8211;with-bench &#8211;with-big-tables &#8211;with-innodb &#8211;with-mysqld-use=mysql
make &#38;&#38; make install
cd ..
rm -rf ${mysql_sourse_name}*
###APACHE
wget ${url}${openssl_sourse_name}&#8221;.tar.gz&#8221;
tar -zxvf $openssl_sourse_name&#8221;.tar.gz&#8221;
cd $openssl_sourse_name
./configure &#8211;prefix=$openssl_install_dir
make &#38;&#38; make install
cd ..
rm -rf ${openssl_sourse_name}*
wget ${url}${httpd_sourse_name}&#8221;.tar.gz&#8221;
tar [...]]]></description>
			<content:encoded><![CDATA[<p>mysql，apache的基本搞定了，php的还有很多问题，先放出这些代码，方便自己操作。PHP部分正在调试。</p>
<p>#!/bin/sh<br />
h_path = &#8220;/root/&#8221;<br />
url=&#8221;http://www.sunboyu.cn/sourse/&#8221;<br />
install_dir=&#8221;/opt/&#8221;<br />
mkdir $install_dir</p>
<p>termcap_sourse_name=&#8221;termcap-1.3.1&#8243;</p>
<p>mysql_sourse_name=&#8221;mysql-5.0.22&#8243;<br />
mysql_install_dir=$install_dir$mysql_sourse_name</p>
<p>openssl_sourse_name=&#8221;openssl-0.9.8g&#8221;<br />
openssl_install_dir=$install_dir$openssl_sourse_name</p>
<p>httpd_sourse_name=&#8221;httpd-2.2.9&#8243;<br />
httpd_install_dir=$install_dir$httpd_sourse_name</p>
<p>fastcgi_sourse_name=&#8221;mod_fastcgi-2.4.6&#8243;<br />
fastcgi_install_dir=$install_dir$fastcgi_sourse_name</p>
<p>libxml2_sourse_name=&#8221;libxml2-2.6.30&#8243;<br />
libxml2_install_dir=$install_dir$libxml2_sourse_name</p>
<p>zlib_sourse_name=&#8221;zlib-1.2.3&#8243;<br />
zlib_install_dir=$install_dir$zlib_sourse_name</p>
<p>jpeg_sourse_name=&#8221;jpegsrc.v6b&#8221;<br />
jpeg_install_dir=$install_dir$jpeg_sourse_name</p>
<p>libpng_sourse_name=&#8221;libpng-1.2.29&#8243;<br />
libpng_install_dir=$install_dir$libpng_sourse_name</p>
<p>freetype_sourse_name=&#8221;freetype-2.3.7&#8243;<br />
freetype_install_dir=$install_dir$freetype_sourse_name</p>
<p>php_sourse_name=&#8221;php-5.2.6&#8243;<br />
php_install_dir=$install_dir$php_sourse_name</p>
<p>###MYSQL<br />
wget ${url}${termcap_sourse_name}&#8221;.tar.gz&#8221;<br />
tar -zxvf $termcap_sourse_name&#8221;.tar.gz&#8221;<br />
cd $termcap_sourse_name<br />
./configure<br />
make &amp;&amp; make install<br />
cd ..<br />
rm -rf ${termcap_sourse_name}*</p>
<p>groupadd mysql<br />
useradd -g mysql mysql</p>
<p>wget ${url}${mysql_sourse_name}&#8221;.tar.gz&#8221;<br />
tar -zxvf $mysql_sourse_name&#8221;.tar.gz&#8221;<br />
cd $mysql_sourse_name<br />
./configure &#8211;prefix=$mysql_install_dir &#8211;enable-thread-safe-client &#8211;enable-local-infile &#8211;enable-largefile &#8211;with-charset=utf8 &#8211;with-uca &#8211;with-gnu-ld &#8211;with-pic &#8211;with-mysqld-libs &#8211;with-comment &#8211;with-query-cache &#8211;with-bench &#8211;with-big-tables &#8211;with-innodb &#8211;with-mysqld-use=mysql<br />
make &amp;&amp; make install<br />
cd ..<br />
rm -rf ${mysql_sourse_name}*</p>
<p>###APACHE</p>
<p>wget ${url}${openssl_sourse_name}&#8221;.tar.gz&#8221;<br />
tar -zxvf $openssl_sourse_name&#8221;.tar.gz&#8221;<br />
cd $openssl_sourse_name<br />
./configure &#8211;prefix=$openssl_install_dir<br />
make &amp;&amp; make install<br />
cd ..<br />
rm -rf ${openssl_sourse_name}*</p>
<p>wget ${url}${httpd_sourse_name}&#8221;.tar.gz&#8221;<br />
tar -zxvf $httpd_sourse_name&#8221;.tar.gz&#8221;<br />
cd $httpd_sourse_name<br />
./configure &#8211;prefix=$httpd_install_dir &#8211;enable-authz-dbm &#8211;enable-log-config &#8211;enable-headers &#8211;enable-setenvif &#8211;with-ssl=$openssl_install_dir &#8211;enable-static-ab &#8211;enable-http &#8211;enable-mime &#8211;enable-status &#8211;enable-suexec &#8211;enable-vhost-alias &#8211;enable-dir &#8211;enable-rewrite &#8211;with-mpm=worker<br />
make &amp;&amp; make install<br />
cd ..<br />
rm -rf ${httpd_sourse_name}*</p>
<p>wget ${url}${fastcgi_sourse_name}&#8221;.tar.gz&#8221;<br />
tar -zxvf $fastcgi_sourse_name&#8221;.tar.gz&#8221;<br />
cd $fastcgi_sourse_name<br />
sed &#8217;s/\/usr\/local\/apache2/\/opt\/httpd-2.2.9\//g&#8217; Makefile.AP2 &gt; Makefile<br />
make &amp;&amp; make install<br />
cd ..<br />
rm -rf ${fastcgi_sourse_name}*</p>
<p>###PHP<br />
wget ${url}${libxml2_sourse_name}&#8221;.tar.gz&#8221;<br />
tar -zxvf $libxml2_sourse_name&#8221;.tar.gz&#8221;<br />
cd $libxml2_sourse_name<br />
./configure &#8211;prefix=$libxml2_install_dir<br />
make &amp;&amp; make install<br />
cd ..<br />
rm -rf ${libxml2_sourse_name}*</p>
<p>wget ${url}${zlib_sourse_name}&#8221;.tar.gz&#8221;<br />
tar -zxvf $zlib_sourse_name&#8221;.tar.gz&#8221;<br />
cd $zlib_sourse_name<br />
./configure &#8211;prefix=$zlib_install_dir<br />
make &amp;&amp; make install<br />
cd ..<br />
rm -rf ${zlib_sourse_name}*</p>
<p>wget ${url}${jpeg_sourse_name}&#8221;.tar.gz&#8221;<br />
tar -zxvf $jpeg_sourse_name&#8221;.tar.gz&#8221;<br />
cd $jpeg_sourse_name<br />
cp makefile.unix Makefile<br />
make &amp;&amp; make install<br />
cd ..<br />
rm -rf ${jpeg_sourse_name}*</p>
<p>wget ${url}${libpng_sourse_name}&#8221;.tar.gz&#8221;<br />
tar -zxvf $libpng_sourse_name&#8221;.tar.gz&#8221;<br />
cd $libpng_sourse_name<br />
./configure &#8211;prefix=$libpng_install_dir<br />
make &amp;&amp; make install<br />
cd ..<br />
rm -rf ${libpng_sourse_name}*</p>
<p>wget ${url}${freetype_sourse_name}&#8221;.tar.gz&#8221;<br />
tar -zxvf $freetype_sourse_name&#8221;.tar.gz&#8221;<br />
cd $freetype_sourse_name<br />
./configure &#8211;prefix=$freetype_install_dir<br />
make &amp;&amp; make install<br />
cd ..<br />
rm -rf ${freetype_sourse_name}*</p>
<p>wget ${url}${php_sourse_name}&#8221;.tar.gz&#8221;<br />
tar -zxvf $php_sourse_name&#8221;.tar.gz&#8221;<br />
./php-5.2.6/configure &#8211;enable-cli &#8211;enable-cgi &#8211;enable-fastcgi &#8211;enable-force-cgi-redirect &#8211;enable-discard-path &#8211;enable-path-info-check &#8211;with-openssl &#8211;with-pcre-regex &#8211;enable-calendar &#8211;enable-dom &#8211;enable-ftp &#8211;with-openssl-dir=/usr/local/openssl &#8211;enable-gd-jis-conv &#8211;enable-hash &#8211;with-iconv &#8211;enable-json &#8211;enable-mbstring &#8211;enable-mbregex &#8211;enable-pdo &#8211;enable-posix &#8211;enable-libxml &#8211;enable-simplexml &#8211;with-sqlite &#8211;enable-tokenizer &#8211;enable-xmlreader &#8211;enable-xmlwriter &#8211;with-zlib=/usr/local/zlib &#8211;with-freetype-dir=/usr/local/freetype &#8211;with-gd &#8211;with-jpeg-dir=/usr/lib/libjpeg.so.62.0.0</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/07/15/lamp%e8%87%aa%e5%8a%a8%e5%ae%89%e8%a3%85%e8%84%9a%e6%9c%ac.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>打造全能优化的Linux+Apache+PHP+Mysql服务器（3）</title>
		<link>http://www.sunboyu.cn/2008/07/15/%e6%89%93%e9%80%a0%e5%85%a8%e8%83%bd%e4%bc%98%e5%8c%96%e7%9a%84linuxapachephpmysql%e6%9c%8d%e5%8a%a1%e5%99%a8%ef%bc%883%ef%bc%89.shtml</link>
		<comments>http://www.sunboyu.cn/2008/07/15/%e6%89%93%e9%80%a0%e5%85%a8%e8%83%bd%e4%bc%98%e5%8c%96%e7%9a%84linuxapachephpmysql%e6%9c%8d%e5%8a%a1%e5%99%a8%ef%bc%883%ef%bc%89.shtml#comments</comments>
		<pubDate>Tue, 15 Jul 2008 06:30:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[APACHE]]></category>

		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[MYSQL]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[apache]]></category>

		<category><![CDATA[fastcgi]]></category>

		<category><![CDATA[openssl]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=199</guid>
		<description><![CDATA[apache部分
先安装openssl
./configure &#8211;enable-authz-dbm &#8211;enable-log-config &#8211;enable-headers &#8211;enable-setenvif &#8211;with-ssl=/usr/local/ssl  &#8211;enable-static-ab &#8211;enable-http &#8211;enable-mime &#8211;enable-status &#8211;enable-suexec &#8211;enable-vhost-alias &#8211;enable-dir &#8211;enable-rewrite &#8211;with-mpm=worker
fastcgi
cp Makefile.AP2 Makefile
make make install
]]></description>
			<content:encoded><![CDATA[<p>apache部分</p>
<p>先安装openssl</p>
<p>./configure &#8211;enable-authz-dbm &#8211;enable-log-config &#8211;enable-headers &#8211;enable-setenvif &#8211;with-ssl=/usr/local/ssl  &#8211;enable-static-ab &#8211;enable-http &#8211;enable-mime &#8211;enable-status &#8211;enable-suexec &#8211;enable-vhost-alias &#8211;enable-dir &#8211;enable-rewrite &#8211;with-mpm=worker</p>
<p>fastcgi</p>
<p>cp Makefile.AP2 Makefile<br />
make make install</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/07/15/%e6%89%93%e9%80%a0%e5%85%a8%e8%83%bd%e4%bc%98%e5%8c%96%e7%9a%84linuxapachephpmysql%e6%9c%8d%e5%8a%a1%e5%99%a8%ef%bc%883%ef%bc%89.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>打造全能优化的Linux+Apache+PHP+Mysql服务器（2）</title>
		<link>http://www.sunboyu.cn/2008/07/15/%e6%89%93%e9%80%a0%e5%85%a8%e8%83%bd%e4%bc%98%e5%8c%96%e7%9a%84linuxapachephpmysql%e6%9c%8d%e5%8a%a1%e5%99%a8%ef%bc%882%ef%bc%89.shtml</link>
		<comments>http://www.sunboyu.cn/2008/07/15/%e6%89%93%e9%80%a0%e5%85%a8%e8%83%bd%e4%bc%98%e5%8c%96%e7%9a%84linuxapachephpmysql%e6%9c%8d%e5%8a%a1%e5%99%a8%ef%bc%882%ef%bc%89.shtml#comments</comments>
		<pubDate>Tue, 15 Jul 2008 03:33:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[APACHE]]></category>

		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[MYSQL]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[mysql]]></category>

		<category><![CDATA[安装]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=197</guid>
		<description><![CDATA[MYsql的安装
mysql 编译参数
./configure &#8211;enable-thread-safe-client &#8211;enable-local-infile &#8211;enable-largefile &#8211;with-charset=utf8  &#8211;with-uca &#8211;with-gnu-ld &#8211;with-pic &#8211;with-mysqld-libs &#8211;with-comment &#8211;with-query-cache &#8211;with-bench &#8211;with-big-tables &#8211;with-innodb &#8211;with-mysqld-use=mysql
/usr/local/bin/mysql_install_db
/usr/local/bin/mysqld_safe  &#8211;user mysql
如果安装时候有错误提示，也许是缺少这个组件  http://www.sunboyu.cn/sourse/termcap-1.3.1.tar.gz
]]></description>
			<content:encoded><![CDATA[<p>MYsql的安装</p>
<p>mysql 编译参数<br />
./configure &#8211;enable-thread-safe-client &#8211;enable-local-infile &#8211;enable-largefile &#8211;with-charset=utf8  &#8211;with-uca &#8211;with-gnu-ld &#8211;with-pic &#8211;with-mysqld-libs &#8211;with-comment &#8211;with-query-cache &#8211;with-bench &#8211;with-big-tables &#8211;with-innodb &#8211;with-mysqld-use=mysql</p>
<p>/usr/local/bin/mysql_install_db</p>
<p>/usr/local/bin/mysqld_safe  &#8211;user mysql</p>
<p>如果安装时候有错误提示，也许是缺少这个组件  http://www.sunboyu.cn/sourse/termcap-1.3.1.tar.gz</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/07/15/%e6%89%93%e9%80%a0%e5%85%a8%e8%83%bd%e4%bc%98%e5%8c%96%e7%9a%84linuxapachephpmysql%e6%9c%8d%e5%8a%a1%e5%99%a8%ef%bc%882%ef%bc%89.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>打造全能优化的Linux+Apache+PHP+Mysql服务器（1）</title>
		<link>http://www.sunboyu.cn/2008/07/13/%e6%89%93%e9%80%a0%e5%85%a8%e8%83%bd%e4%bc%98%e5%8c%96%e7%9a%84linuxapachephpmysql%e6%9c%8d%e5%8a%a1%e5%99%a8%ef%bc%881%ef%bc%89.shtml</link>
		<comments>http://www.sunboyu.cn/2008/07/13/%e6%89%93%e9%80%a0%e5%85%a8%e8%83%bd%e4%bc%98%e5%8c%96%e7%9a%84linuxapachephpmysql%e6%9c%8d%e5%8a%a1%e5%99%a8%ef%bc%881%ef%bc%89.shtml#comments</comments>
		<pubDate>Sun, 13 Jul 2008 13:05:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[APACHE]]></category>

		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[MYSQL]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[apache]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[mysql]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[服务器]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=196</guid>
		<description><![CDATA[fastcgi   http://www.fastcgi.com/dist/mod_fastcgi-2.4.6.tar.gz
apache2   http://apache.mirror.phpchina.com/httpd/httpd-2.2.9.tar.gz
mysql5    http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.51b.tar.gz/from/http://mysql.mirrors.arminco.com/
php5      http://cn2.php.net/distributions/php-5.2.6.tar.gz
libxml2
gd-jpeg   ftp://192.48.96.9/graphics/jpeg/jpegsrc.v6b.tar.gz
freetype  http://voxel.dl.sourceforge.net/sourceforge/freetype/freetype-2.3.7.tar.gz
libpng    http://voxel.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.29.tar.gz
zend      http://www.zend.com/download/55
memcached  http://www.danga.com/memcached/dist/memcached-1.2.5.tar.gz
memcache   http://pecl.php.net/get/memcache-3.0.1.tgz
libevent   http://www.monkey.org/~provos/libevent-1.2a.tar.gz
目前想到的功能大概有这些，想到再加。
目前正在研究每一个组件的性能和参数。
]]></description>
			<content:encoded><![CDATA[<p>fastcgi   http://www.fastcgi.com/dist/mod_fastcgi-2.4.6.tar.gz<br />
apache2   http://apache.mirror.phpchina.com/httpd/httpd-2.2.9.tar.gz<br />
mysql5    http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.51b.tar.gz/from/http://mysql.mirrors.arminco.com/<br />
php5      http://cn2.php.net/distributions/php-5.2.6.tar.gz<br />
libxml2<br />
gd-jpeg   ftp://192.48.96.9/graphics/jpeg/jpegsrc.v6b.tar.gz<br />
freetype  http://voxel.dl.sourceforge.net/sourceforge/freetype/freetype-2.3.7.tar.gz<br />
libpng    http://voxel.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.29.tar.gz<br />
zend      http://www.zend.com/download/55</p>
<p>memcached  http://www.danga.com/memcached/dist/memcached-1.2.5.tar.gz<br />
memcache   http://pecl.php.net/get/memcache-3.0.1.tgz<br />
libevent   http://www.monkey.org/~provos/libevent-1.2a.tar.gz</p>
<p>目前想到的功能大概有这些，想到再加。</p>
<p>目前正在研究每一个组件的性能和参数。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/07/13/%e6%89%93%e9%80%a0%e5%85%a8%e8%83%bd%e4%bc%98%e5%8c%96%e7%9a%84linuxapachephpmysql%e6%9c%8d%e5%8a%a1%e5%99%a8%ef%bc%881%ef%bc%89.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>Zeus适用体会</title>
		<link>http://www.sunboyu.cn/2008/07/11/zeus%e9%80%82%e7%94%a8%e4%bd%93%e4%bc%9a.shtml</link>
		<comments>http://www.sunboyu.cn/2008/07/11/zeus%e9%80%82%e7%94%a8%e4%bd%93%e4%bc%9a.shtml#comments</comments>
		<pubDate>Fri, 11 Jul 2008 14:21:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[技术存档]]></category>

		<category><![CDATA[Zeus]]></category>

		<category><![CDATA[体验]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=195</guid>
		<description><![CDATA[本来以为linux的软件安装会很麻烦，没想到安装Zeus如此的简单，一路next或者yes/no即可安装。系统有完善的后台管理界面，图形化的日志报表。
相比apache，功能没有显少，但效率和负载却很强。Zeus支持FastCGI的方式来运行PHP，这样LZMP的架构的确也很强。
唯一的缺点，Zeus收费。
]]></description>
			<content:encoded><![CDATA[<p>本来以为linux的软件安装会很麻烦，没想到安装Zeus如此的简单，一路next或者yes/no即可安装。系统有完善的后台管理界面，图形化的日志报表。</p>
<p>相比apache，功能没有显少，但效率和负载却很强。Zeus支持FastCGI的方式来运行PHP，这样LZMP的架构的确也很强。</p>
<p>唯一的缺点，Zeus收费。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/07/11/zeus%e9%80%82%e7%94%a8%e4%bd%93%e4%bc%9a.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>Linux安装FMS2</title>
		<link>http://www.sunboyu.cn/2008/06/23/linux%e5%ae%89%e8%a3%85fms2.shtml</link>
		<comments>http://www.sunboyu.cn/2008/06/23/linux%e5%ae%89%e8%a3%85fms2.shtml#comments</comments>
		<pubDate>Mon, 23 Jun 2008 07:01:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[FMS2]]></category>

		<category><![CDATA[安装]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=134</guid>
		<description><![CDATA[首先下载 FlashMediaServer2.tar.gz  http://aw.awflasher.com/FMS2/FlashMediaServer2.tar.gz
解压后，检测组件是否完全
#ldd fmscore
[root@localhost FMS_2_0_3_r68_linux]# ldd fmscore
linux-gate.so.1 =&#62;  (0&#215;0032b000)
libssl.so.4 =&#62; not found
libpthread.so.0 =&#62; /lib/libpthread.so.0 (0&#215;007f7000)
libnspr4.so =&#62; /usr/lib/libnspr4.so (0&#215;00b24000)
libplc4.so =&#62; /usr/lib/libplc4.so (0&#215;0020c000)
libplds4.so =&#62; /usr/lib/libplds4.so (0&#215;00198000)
librt.so.1 =&#62; /lib/librt.so.1 (0&#215;002f4000)
libdl.so.2 =&#62; /lib/libdl.so.2 (0&#215;001d2000)
libstdc++.so.5 =&#62; not found
libm.so.6 =&#62; /lib/libm.so.6 (0&#215;009c0000)
libgcc_s.so.1 =&#62; /lib/libgcc_s.so.1 (0&#215;001f1000)
libc.so.6 =&#62; /lib/libc.so.6 (0&#215;003c6000)
/lib/ld-linux.so.2 (0&#215;0090e000)
libcrypto.so.4 =&#62; not found
[root@localhost FMS_2_0_3_r68_linux]#
缺少 libssl.so.4  libstdc++.so.5 libcrypto.so.4
其实这些库是有的，只是名字不是，或者版本比较高，建立一个链接就行
ln -s /usr/lib/libssl.so /usr/lib/libssl.so.4
其他也这样就行。
./installFMS
如果总是提示出错(./installFMS -platformWarnOnly)
这样即可。低下按照提示一步步来就行。
./fmsmgr list   [...]]]></description>
			<content:encoded><![CDATA[<p>首先下载 FlashMediaServer2.tar.gz  http://aw.awflasher.com/FMS2/FlashMediaServer2.tar.gz</p>
<p>解压后，检测组件是否完全</p>
<p>#ldd fmscore</p>
<p>[root@localhost FMS_2_0_3_r68_linux]# ldd fmscore<br />
linux-gate.so.1 =&gt;  (0&#215;0032b000)<br />
libssl.so.4 =&gt; not found<br />
libpthread.so.0 =&gt; /lib/libpthread.so.0 (0&#215;007f7000)<br />
libnspr4.so =&gt; /usr/lib/libnspr4.so (0&#215;00b24000)<br />
libplc4.so =&gt; /usr/lib/libplc4.so (0&#215;0020c000)<br />
libplds4.so =&gt; /usr/lib/libplds4.so (0&#215;00198000)<br />
librt.so.1 =&gt; /lib/librt.so.1 (0&#215;002f4000)<br />
libdl.so.2 =&gt; /lib/libdl.so.2 (0&#215;001d2000)<br />
libstdc++.so.5 =&gt; not found<br />
libm.so.6 =&gt; /lib/libm.so.6 (0&#215;009c0000)<br />
libgcc_s.so.1 =&gt; /lib/libgcc_s.so.1 (0&#215;001f1000)<br />
libc.so.6 =&gt; /lib/libc.so.6 (0&#215;003c6000)<br />
/lib/ld-linux.so.2 (0&#215;0090e000)<br />
libcrypto.so.4 =&gt; not found<br />
[root@localhost FMS_2_0_3_r68_linux]#</p>
<p>缺少 libssl.so.4  libstdc++.so.5 libcrypto.so.4</p>
<p>其实这些库是有的，只是名字不是，或者版本比较高，建立一个链接就行</p>
<p>ln -s /usr/lib/libssl.so /usr/lib/libssl.so.4</p>
<p>其他也这样就行。</p>
<p>./installFMS<br />
如果总是提示出错(./installFMS -platformWarnOnly)</p>
<p>这样即可。低下按照提示一步步来就行。</p>
<p>./fmsmgr list   可以查看运行的状态</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/06/23/linux%e5%ae%89%e8%a3%85fms2.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>视频网站通用结构图</title>
		<link>http://www.sunboyu.cn/2008/06/22/%e8%a7%86%e9%a2%91%e7%bd%91%e7%ab%99%e9%80%9a%e7%94%a8%e7%bb%93%e6%9e%84%e5%9b%be.shtml</link>
		<comments>http://www.sunboyu.cn/2008/06/22/%e8%a7%86%e9%a2%91%e7%bd%91%e7%ab%99%e9%80%9a%e7%94%a8%e7%bb%93%e6%9e%84%e5%9b%be.shtml#comments</comments>
		<pubDate>Sun, 22 Jun 2008 12:16:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[结构]]></category>

		<category><![CDATA[视频网站]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=132</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sunboyu.cn/upfiles/2008/06/e8a786e9a291e7bd91e7ab99e7bb93e69e84e8aebee8aea1.jpg"><img src="http://www.sunboyu.cn/upfiles/2008/06/e8a786e9a291e7bd91e7ab99e7bb93e69e84e8aebee8aea1.jpg" border="0" alt="" width="630" height="372" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/06/22/%e8%a7%86%e9%a2%91%e7%bd%91%e7%ab%99%e9%80%9a%e7%94%a8%e7%bb%93%e6%9e%84%e5%9b%be.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>Mysql备份SHELL v1.0demo版问世</title>
		<link>http://www.sunboyu.cn/2008/06/22/mysql%e5%a4%87%e4%bb%bdshell-v10demo%e7%89%88%e9%97%ae%e4%b8%96.shtml</link>
		<comments>http://www.sunboyu.cn/2008/06/22/mysql%e5%a4%87%e4%bb%bdshell-v10demo%e7%89%88%e9%97%ae%e4%b8%96.shtml#comments</comments>
		<pubDate>Sat, 21 Jun 2008 20:57:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[cli.phpshell]]></category>

		<category><![CDATA[shell]]></category>

		<category><![CDATA[杜江]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=130</guid>
		<description><![CDATA[虽然功能不是很完善，应该很不完善，但还是放出来让大家批评一下。
感谢PHP开源支持者的鼓励，感谢杜江老师的鼓励。mysqldump v1.0 demo 下载 版权所有，欢迎盗版！
源代码

#!/usr/local/bin/php -q
# mysql cron manager system
# sunboyu@gmail.com
# v1.0
define(&#8217;SUN_FILE_NAME&#8217;,'bak.sh&#8217;);
define(&#8217;SUN_BAK_PATH&#8217;,&#8217;./&#8217;); #bak path
define(&#8217;SUN_CFG_PATH&#8217;,&#8217;./&#8217;); #config file path
define(&#8217;SUN_LOG_PATH&#8217;,&#8217;./&#8217;); #log file path
define(&#8217;SUN_DATABASE_CHARACTER&#8217;,'UTF-8&#8242;); #mysql character
define(&#8217;SUN_SHELL_EXEC&#8217;,&#8221;system&#8221;);
define(&#8217;SUN_IS_TAR&#8217;,0);
#save temp argv in session
session_start();
Main::mains();
class Main
{
//main()
public static function mains()
{
KernelInfo::version();
self::getUserInput();
}
//for user&#8217;s inpyt
public function getUserInput()
{
while(($u_char = KernelBase::cgetchar(&#8217;shell&#8217;))&#38;&#38;($u_char != &#8216;quit&#8217;))
{
switch($u_char)
{
case &#8220;&#8211;help&#8221;:
KernelInfo::help();
break;
case &#8220;&#8211;version&#8221;:
KernelInfo::version();
break;
case &#8220;&#8211;check&#8221;:
KernelInfo::checksystem();
break;
case &#8220;&#8211;mysqldump&#8221;:
Mysql::MysqlGuide();
break;
default:
print(&#8221;error input!\n&#8221;);
break;
}
}
}
}
class KernelBase
{
//get input string
public function cgetchar( $cue = false )
{
if( $cue )
{
print($cue.&#8221;:&#8221;);
}
$string = [...]]]></description>
			<content:encoded><![CDATA[<p>虽然功能不是很完善，应该很不完善，但还是放出来让大家批评一下。</p>
<p>感谢PHP开源支持者的鼓励，感谢杜江老师的鼓励。<a href="http://www.sunboyu.cn/upfiles/2008/06/mysqldump.sh">mysqldump v1.0 demo 下载</a> 版权所有，欢迎盗版！</p>
<p>源代码</p>
<p><span id="more-130"></span></p>
<p>#!/usr/local/bin/php -q<br />
<!--p<br--># mysql cron manager system<br />
# sunboyu@gmail.com<br />
# v1.0<br />
define(&#8217;SUN_FILE_NAME&#8217;,'bak.sh&#8217;);<br />
define(&#8217;SUN_BAK_PATH&#8217;,&#8217;./&#8217;); #bak path<br />
define(&#8217;SUN_CFG_PATH&#8217;,&#8217;./&#8217;); #config file path<br />
define(&#8217;SUN_LOG_PATH&#8217;,&#8217;./&#8217;); #log file path<br />
define(&#8217;SUN_DATABASE_CHARACTER&#8217;,'UTF-8&#8242;); #mysql character<br />
define(&#8217;SUN_SHELL_EXEC&#8217;,&#8221;system&#8221;);<br />
define(&#8217;SUN_IS_TAR&#8217;,0);<br />
#save temp argv in session<br />
session_start();</p>
<p>Main::mains();</p>
<p>class Main<br />
{<br />
//main()<br />
public static function mains()<br />
{<br />
KernelInfo::version();<br />
self::getUserInput();<br />
}<br />
//for user&#8217;s inpyt<br />
public function getUserInput()<br />
{<br />
while(($u_char = KernelBase::cgetchar(&#8217;shell&#8217;))&amp;&amp;($u_char != &#8216;quit&#8217;))<br />
{<br />
switch($u_char)<br />
{<br />
case &#8220;&#8211;help&#8221;:<br />
KernelInfo::help();<br />
break;<br />
case &#8220;&#8211;version&#8221;:<br />
KernelInfo::version();<br />
break;<br />
case &#8220;&#8211;check&#8221;:<br />
KernelInfo::checksystem();<br />
break;<br />
case &#8220;&#8211;mysqldump&#8221;:<br />
Mysql::MysqlGuide();<br />
break;<br />
default:<br />
print(&#8221;error input!\n&#8221;);<br />
break;<br />
}<br />
}<br />
}<br />
}</p>
<p>class KernelBase<br />
{<br />
//get input string<br />
public function cgetchar( $cue = false )<br />
{<br />
if( $cue )<br />
{<br />
print($cue.&#8221;:&#8221;);<br />
}<br />
$string = trim(fgets(STDIN));<br />
return $string;<br />
}<br />
//get argvs<br />
public function cgetargv( $string )<br />
{<br />
if(!empty($string))<br />
{<br />
$argvs = explode( &#8221; &#8221; , $string );<br />
$reargvs = false;<br />
for( $i = 0; $i &lt; count($argvs) ; $i++ )<br />
{<br />
if( $argvs[$i][0]==&#8217;-&#8217; &amp;&amp; $argvs[$i][1]==&#8217;-&#8217; )<br />
{<br />
$reargvs[$argvs[$i]] = true;<br />
$x++;<br />
}<br />
else if( $argvs[$i][0]==&#8217;-&#8217; &amp;&amp; $argvs[$i][1]!=&#8217;-&#8217; )<br />
{<br />
$reargvs[$argvs[$i]] = isset($argvs[($i+1)])&amp;&amp;($argvs[($i+1)][0]!=&#8217;-')&amp;&amp;($argvs[($i+1)][0]!=&#8221;) ? $argvs[($i+1)] : &#8221;;<br />
isset($argvs[($i+1)])&amp;&amp;($argvs[($i+1)][0]!=&#8217;-')&amp;&amp;($argvs[($i+1)][0]!=&#8221;) ? $i++ : &#8221;;<br />
}<br />
}<br />
return $reargvs;<br />
}<br />
else<br />
{<br />
return false;<br />
}<br />
}<br />
}</p>
<p>class KernelIO<br />
{<br />
//write file<br />
public function write_file( $filename , $content )<br />
{<br />
$handle = fopen( $filename );<br />
fwrite( $handle , $content );<br />
fclose( $handle );<br />
}<br />
}<br />
class KernelInfo<br />
{<br />
//show version<br />
public function version()<br />
{<br />
print(&#8221;##################################\n&#8221;);<br />
print(&#8221;# Mysql Back Cron Manage Shell #\n&#8221;);<br />
print(&#8221;# Auth: sunboyu #\n&#8221;);<br />
print(&#8221;# Version: v1.0 #\n&#8221;);<br />
print(&#8221;##################################\n&#8221;);<br />
}<br />
//show help<br />
public function help()<br />
{<br />
print(sprintf(&#8221;%s [--version] [--help] [--check]\n&#8221;,SUN_FILE_NAME));<br />
print(&#8221; &#8211;version Show\n&#8221;);<br />
print(&#8221; &#8211;help This Help\n&#8221;);<br />
print(&#8221; &#8211;check This Help\n&#8221;);<br />
}<br />
//check system info<br />
public function checksystem()<br />
{<br />
print(&#8221;System:&#8221;.$_GLOBAL['System'].&#8221;\n&#8221;);<br />
$check_dir = array( SUN_BAK_PATH , SUN_CFG_PATH , SUN_LOG_PATH );<br />
foreach($check_dir as $key =&gt; $value)<br />
{<br />
if(is_writable($value))<br />
{<br />
print(&#8221;The dir &#8216;&#8221;.$value.&#8221;&#8216; is writable!\n&#8221;);<br />
}<br />
else<br />
{<br />
print(&#8221;The dir &#8216;&#8221;.$value.&#8221;&#8216; is unwritable.Please check the power!\n&#8221;);<br />
print(&#8221;The shell is stop!&#8221;);<br />
exit();<br />
}<br />
}<br />
$shell_exec = SUN_SHELL_EXEC;<br />
if($shell_exec(&#8217;ls&#8217;))<br />
{<br />
print(&#8221;The shell can execute &#8220;.SUN_SHELL_EXEC.&#8221;;\n&#8221;);<br />
}<br />
else<br />
{<br />
print(&#8221;The shell can&#8217;t execute &#8220;.SUN_SHELL_EXEC.&#8221;;\n&#8221;);<br />
print(&#8221;The shell is stop!&#8221;);<br />
exit();<br />
}<br />
print(&#8221;The Shell can work in this system!\n&#8221;);<br />
}<br />
//check is writeable the dir<br />
public function is_writeable( $dir )<br />
{<br />
return @is_writable( $dir );<br />
}<br />
}</p>
<p>#Mysql Dump<br />
class Mysql<br />
{<br />
function MysqlGuide()<br />
{<br />
$mysqlargv = array(<br />
&#8216;-host&#8217; =&gt; false,<br />
&#8216;-username&#8217; =&gt; false,<br />
&#8216;-password&#8217; =&gt; false,<br />
&#8216;-datebase&#8217; =&gt; false,<br />
&#8216;-otherargv&#8217; =&gt; false<br />
);<br />
$argvs = KernelBase::cgetargv(KernelBase::cgetchar(&#8221;input argv&#8221;));<br />
foreach($argvs as $key =&gt; $value)<br />
{<br />
$mysqlargv[$key] = empty($value) ? &#8221; : $value;<br />
}<br />
if($mysqlargv['-host']&amp;&amp;$mysqlargv['-username']&amp;&amp;$mysqlargv['-datebase'])<br />
{<br />
self::Mysqldump( $mysqlargv['-host'] , $mysqlargv['-username'] , $mysqlargv['-password'] , $mysqlargv['-datebase'] , $mysqlargv['-otherargv'] );<br />
}<br />
else<br />
{<br />
print(&#8221;error vars!\n&#8221;);<br />
}<br />
}<br />
function Mysqldump( $host = false , $username = false , $password = &#8221; , $datebase = false , $otherargv = false )<br />
{<br />
$shell_exec = SUN_SHELL_EXEC;<br />
if($host&amp;&amp;$username&amp;&amp;$datebase)<br />
{<br />
$command = &#8220;mysqldump &#8211;opt &#8220;.$datebase.&#8221; -u&#8221;.$datebase.&#8221; -p&#8221;.$db_password.( $otherargv ? $otherargv : &#8221; ).&#8221; &gt; &#8220;.SUN_BAK_PATH.&#8221;db_bak.sql&#8221;;<br />
$feedback = $shell_exec( $command );<br />
print($feedback.&#8221;\n&#8221;);<br />
}<br />
}<br />
}</p>
<p>?&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/06/22/mysql%e5%a4%87%e4%bb%bdshell-v10demo%e7%89%88%e9%97%ae%e4%b8%96.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>基于PHP-CLI的数据库备份管理软件今日奠基</title>
		<link>http://www.sunboyu.cn/2008/06/20/%e5%9f%ba%e4%ba%8ephp-cli%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93%e5%a4%87%e4%bb%bd%e7%ae%a1%e7%90%86%e8%bd%af%e4%bb%b6%e4%bb%8a%e6%97%a5%e5%a5%a0%e5%9f%ba.shtml</link>
		<comments>http://www.sunboyu.cn/2008/06/20/%e5%9f%ba%e4%ba%8ephp-cli%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93%e5%a4%87%e4%bb%bd%e7%ae%a1%e7%90%86%e8%bd%af%e4%bb%b6%e4%bb%8a%e6%97%a5%e5%a5%a0%e5%9f%ba.shtml#comments</comments>
		<pubDate>Fri, 20 Jun 2008 15:37:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[dump]]></category>

		<category><![CDATA[mysql]]></category>

		<category><![CDATA[软件]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=128</guid>
		<description><![CDATA[确定了基本的功能

创建任务mysql数据库备份任务
管理cron任务跟备份任务的结合
任务管理

基本能满足一个网管备份mysql的日常操作。
由于是第一个版本，没做太多的功能，实现再说。
这个东东也是展示下PHP功能的强大。PHP代替Perl也不是不可能的。
]]></description>
			<content:encoded><![CDATA[<p>确定了基本的功能</p>
<ul>
<li>创建任务mysql数据库备份任务</li>
<li>管理cron任务跟备份任务的结合</li>
<li>任务管理</li>
</ul>
<p>基本能满足一个网管备份mysql的日常操作。</p>
<p>由于是第一个版本，没做太多的功能，实现再说。</p>
<p>这个东东也是展示下PHP功能的强大。PHP代替Perl也不是不可能的。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/06/20/%e5%9f%ba%e4%ba%8ephp-cli%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93%e5%a4%87%e4%bb%bd%e7%ae%a1%e7%90%86%e8%bd%af%e4%bb%b6%e4%bb%8a%e6%97%a5%e5%a5%a0%e5%9f%ba.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>centos5安装指南（简单篇）</title>
		<link>http://www.sunboyu.cn/2008/06/13/centos5%e5%ae%89%e8%a3%85%e6%8c%87%e5%8d%97%ef%bc%88%e7%ae%80%e5%8d%95%e7%af%87%ef%bc%89.shtml</link>
		<comments>http://www.sunboyu.cn/2008/06/13/centos5%e5%ae%89%e8%a3%85%e6%8c%87%e5%8d%97%ef%bc%88%e7%ae%80%e5%8d%95%e7%af%87%ef%bc%89.shtml#comments</comments>
		<pubDate>Fri, 13 Jun 2008 13:50:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LINUX]]></category>

		<category><![CDATA[apache]]></category>

		<category><![CDATA[centos]]></category>

		<category><![CDATA[mysql]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[图形]]></category>

		<category><![CDATA[教程]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=87</guid>
		<description><![CDATA[
进入默认页面，直接回车即可

测试光盘文件的完整性，我一般都跳过


直接下一步

我一般都选择英文，因为命令行里好像不很支持中文

格盘，yes即可。注意：这里是在虚拟机或者一个空机器上进行安装，如果你在其他操作系统上安装双系统，此操作危险！

NEXT，使用默认的即可

YES,继续

分配IP地址，或者使用dhcp，此知识点不懂的话，不归本文管。

设置系统时区，一般用UTC，虽然有时候会用东八区。

设置root帐号的密码

选择定制安装或者是定制安装，当然我们要定制安装。

选择Development中的Development Libraries,Development Tools

选择Base System中的Base和Legacy Software Support
选择这四个，其他的就都不要选了，需要的话再慢慢装。

NEXT开始安装

装完，重启

root登录

这样安装AMP(APACHE MYSQL PHP)即可
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sunboyu.cn/upfiles/2008/06/1.jpg"><img class="alignnone size-medium wp-image-91" title="1" src="http://www.sunboyu.cn/upfiles/2008/06/1-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>进入默认页面，直接回车即可</p>
<p><a href="http://www.sunboyu.cn/upfiles/2008/06/2.jpg"><img class="alignnone size-medium wp-image-92" title="2" src="http://www.sunboyu.cn/upfiles/2008/06/2-300x166.jpg" alt="" width="300" height="166" /></a></p>
<p>测试光盘文件的完整性，我一般都跳过</p>
<p><span id="more-87"></span></p>
<p><a href="http://www.sunboyu.cn/upfiles/2008/06/3.jpg"><img class="alignnone size-medium wp-image-93" title="3" src="http://www.sunboyu.cn/upfiles/2008/06/3-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>直接下一步</p>
<p><a href="http://www.sunboyu.cn/upfiles/2008/06/4.jpg"><img class="alignnone size-medium wp-image-94" title="4" src="http://www.sunboyu.cn/upfiles/2008/06/4-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>我一般都选择英文，因为命令行里好像不很支持中文</p>
<p><a href="http://www.sunboyu.cn/upfiles/2008/06/6.jpg"><img class="alignnone size-medium wp-image-96" title="6" src="http://www.sunboyu.cn/upfiles/2008/06/6-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>格盘，yes即可。注意：这里是在虚拟机或者一个空机器上进行安装，如果你在其他操作系统上安装双系统，此操作危险！</p>
<p><a href="http://www.sunboyu.cn/upfiles/2008/06/7.jpg"><img class="alignnone size-medium wp-image-97" title="7" src="http://www.sunboyu.cn/upfiles/2008/06/7-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>NEXT，使用默认的即可</p>
<p><a href="http://www.sunboyu.cn/upfiles/2008/06/8.jpg"><img class="alignnone size-medium wp-image-98" title="8" src="http://www.sunboyu.cn/upfiles/2008/06/8-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>YES,继续</p>
<p><a href="http://www.sunboyu.cn/upfiles/2008/06/9.jpg"><img class="alignnone size-medium wp-image-99" title="9" src="http://www.sunboyu.cn/upfiles/2008/06/9-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>分配IP地址，或者使用dhcp，此知识点不懂的话，不归本文管。</p>
<p><a href="http://www.sunboyu.cn/upfiles/2008/06/10.jpg"><img class="alignnone size-medium wp-image-100" title="10" src="http://www.sunboyu.cn/upfiles/2008/06/10-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>设置系统时区，一般用UTC，虽然有时候会用东八区。</p>
<p><a href="http://www.sunboyu.cn/upfiles/2008/06/11.jpg"><img class="alignnone size-medium wp-image-101" title="11" src="http://www.sunboyu.cn/upfiles/2008/06/11-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>设置root帐号的密码</p>
<p><a href="http://www.sunboyu.cn/upfiles/2008/06/12.jpg"><img class="alignnone size-medium wp-image-102" title="12" src="http://www.sunboyu.cn/upfiles/2008/06/12-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>选择定制安装或者是定制安装，当然我们要定制安装。</p>
<p><a href="http://www.sunboyu.cn/upfiles/2008/06/13.jpg"><img class="alignnone size-medium wp-image-103" title="13" src="http://www.sunboyu.cn/upfiles/2008/06/13-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>选择Development中的Development Libraries,Development Tools</p>
<p><a href="http://www.sunboyu.cn/upfiles/2008/06/14.jpg"><img class="alignnone size-medium wp-image-104" title="14" src="http://www.sunboyu.cn/upfiles/2008/06/14-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>选择Base System中的Base和Legacy Software Support</p>
<p>选择这四个，其他的就都不要选了，需要的话再慢慢装。</p>
<p><a href="http://www.sunboyu.cn/upfiles/2008/06/15.jpg"><img class="alignnone size-medium wp-image-105" title="15" src="http://www.sunboyu.cn/upfiles/2008/06/15-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>NEXT开始安装</p>
<p><a href="http://www.sunboyu.cn/upfiles/2008/06/17.jpg"><img class="alignnone size-medium wp-image-107" title="17" src="http://www.sunboyu.cn/upfiles/2008/06/17-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>装完，重启</p>
<p><a href="http://www.sunboyu.cn/upfiles/2008/06/18.jpg"><img class="alignnone size-medium wp-image-108" title="18" src="http://www.sunboyu.cn/upfiles/2008/06/18-300x166.jpg" alt="" width="300" height="166" /></a></p>
<p>root登录</p>
<p><a href="http://www.sunboyu.cn/upfiles/2008/06/19.jpg"><img class="alignnone size-medium wp-image-109" title="19" src="http://www.sunboyu.cn/upfiles/2008/06/19-300x166.jpg" alt="" width="300" height="166" /></a></p>
<p>这样安装AMP(APACHE MYSQL PHP)即可</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/06/13/centos5%e5%ae%89%e8%a3%85%e6%8c%87%e5%8d%97%ef%bc%88%e7%ae%80%e5%8d%95%e7%af%87%ef%bc%89.shtml/feed</wfw:commentRss>
		</item>
	</channel>
</rss>

