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

<channel>
	<title>肚破惊天 &#187; 采集</title>
	<atom:link href="http://dupola.com/tag/%e9%87%87%e9%9b%86/feed" rel="self" type="application/rss+xml" />
	<link>http://dupola.com</link>
	<description>真理和美女都是赤裸裸的。</description>
	<lastBuildDate>Tue, 31 Aug 2010 18:10:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>肚破惊天 &#187; 采集 : [转]Dreamhost SSH 自己编辑PHP.INI(已开fopen为例)</title>
		<link>http://dupola.com/post/109</link>
		<comments>http://dupola.com/post/109#comments</comments>
		<pubDate>Mon, 19 Feb 2007 19:56:56 +0000</pubDate>
		<dc:creator>dupola</dc:creator>
				<category><![CDATA[DreamHost]]></category>
		<category><![CDATA[Putty]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[采集]]></category>

		<guid isPermaLink="false">http://dupola.com/post/109</guid>
		<description><![CDATA[

 Dreamhost SSH 自己编辑PHP.INI(已开fopen为例)
1.用SSH登陆空间
可以使用putty.exe登陆
下载地址:http://down.chinaz.com/s/7760.asp


 2.在你空间放置(就是你的domain.com目录下)目录建立cgi-bin文件夹
用SSH登陆后直接输入命令:

[coolcode]  mkdir ~/[your website directory]/cgi-bin/[/coolcode]
PS:[your website directory] 即 你的domain.com文件夹名字或者你自定义的文件夹名字!
3.建立 php-update.sh 文件(现在SSH还是在根目录)
建立php-update.sh
[coolcode] vim php-update.sh[/coolcode]
写入内容按下&#8221;i&#8221;键插入.
此时看你的php版本
php4
[coolcode]#!/bin/sh
CGIFILE=&#8221;$HOME/[your website directory]/cgi-bin/php.cgi&#8221;
INIFILE=&#8221;$HOME/[your website directory]/cgi-bin/php.ini&#8221;
cp /dh/cgi-system/php.cgi &#8220;$CGIFILE&#8221;
cp /etc/php/cgi/php.ini &#8220;$INIFILE&#8221;
perl -p -i -e &#8216;
s/.*allow_url_fopen.*/allow_url_fopen = On/;
&#8216; &#8220;$INIFILE&#8221;[/coolcode]
php5
[coolcode]#!/bin/sh
CGIFILE=&#8221;$HOME/[your website directory]/cgi-bin/php.cgi&#8221;
INIFILE=&#8221;$HOME/[your website directory]/cgi-bin/php.ini&#8221;
cp /dh/cgi-system/php5.cgi &#8220;$CGIFILE&#8221;
cp /etc/php5/cgi/php.ini &#8220;$INIFILE&#8221;
perl -p -i -e &#8216;
s/.*allow_url_fopen.*/allow_url_fopen = On/;
&#8216; &#8220;$INIFILE&#8221;[/coolcode]
把[your website directory] 改成你自己的.
此代码既是开启 fopen 如果你还想开启其他的自己编辑以上代码即可.
直接复制然后在putty里按右键就可以复制进去!然后按下键盘的&#8217;ESC&#8217;然后输入&#8221;:wq&#8221;,既可以退出.(不包括&#8221; &#8220;
4运行 php-update.sh
[coolcode]chmod [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-9616737115243457";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
//2006-12-15: dupola.com
google_ad_channel = "1970191960";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "005599";
google_color_text = "999999";
google_color_url = "666666";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></-> <p>Dreamhost SSH 自己编辑PHP.INI(已开fopen为例)<br />
1.用SSH登陆空间<br />
可以使用putty.exe登陆<br />
下载地址:http://down.chinaz.com/s/7760.asp<br />
<span class="bold"><img src="http://photo1.bababian.com/20070320/CD924067FDE2695BA289302BA308492E_500.jpg" height="435" width="451" /><br />
<img src="http://photo1.bababian.com/20070320/E9168B9C9F917B95754513904D4AB801_500.jpg" height="311" width="500" /><br />
</span> 2.在你空间放置(就是你的domain.com目录下)目录建立cgi-bin文件夹<br />
用SSH登陆后直接输入命令:</p>
<p><img src="http://photo1.bababian.com/20070320/822A8DC24AAA8C0718C68C3D2C37DC71_500.jpg" /><br />
[coolcode]  mkdir ~/[your website directory]/cgi-bin/[/coolcode]<br />
PS:[your website directory] 即 你的domain.com文件夹名字或者你自定义的文件夹名字!</p>
<p>3.建立 php-update.sh 文件(现在SSH还是在根目录)</p>
<p>建立php-update.sh<br />
[coolcode] vim php-update.sh[/coolcode]<br />
写入内容按下&#8221;i&#8221;键插入.<br />
此时看你的php版本<br />
<strong>php4</strong><br />
[coolcode]#!/bin/sh<br />
CGIFILE=&#8221;$HOME/[your website directory]/cgi-bin/php.cgi&#8221;<br />
INIFILE=&#8221;$HOME/[your website directory]/cgi-bin/php.ini&#8221;<br />
cp /dh/cgi-system/php.cgi &#8220;$CGIFILE&#8221;<br />
cp /etc/php/cgi/php.ini &#8220;$INIFILE&#8221;</p>
<p>perl -p -i -e &#8216;<br />
s/.*allow_url_fopen.*/allow_url_fopen = On/;<br />
&#8216; &#8220;$INIFILE&#8221;[/coolcode]</p>
<p><strong>php5</strong><br />
[coolcode]#!/bin/sh<br />
CGIFILE=&#8221;$HOME/[your website directory]/cgi-bin/php.cgi&#8221;<br />
INIFILE=&#8221;$HOME/[your website directory]/cgi-bin/php.ini&#8221;<br />
cp /dh/cgi-system/php5.cgi &#8220;$CGIFILE&#8221;<br />
cp /etc/php5/cgi/php.ini &#8220;$INIFILE&#8221;</p>
<p>perl -p -i -e &#8216;<br />
s/.*allow_url_fopen.*/allow_url_fopen = On/;<br />
&#8216; &#8220;$INIFILE&#8221;[/coolcode]</p>
<p>把[your website directory] <font color="Blue">改成你自己的.</font><br />
此代码既是开启 fopen 如果你还想开启其他的自己编辑以上代码即可.<br />
直接复制然后在putty里按右键就可以复制进去!然后<font color="Blue">按下键盘的&#8217;ESC&#8217;然后输入&#8221;:wq&#8221;,既可以退出.(不包括&#8221; &#8220;<img src="http://www.im286.com/images/smilies/wink.gif" smilieid="4" border="0" /></font></p>
<p>4运行 php-update.sh<br />
[coolcode]chmod +x php-update.sh[/coolcode]<br />
[coolcode]./php-update.sh[/coolcode]<br />
<img src="http://photo1.bababian.com/20070320/613B90EC54532CD6F4AE79E76FB7757F_500.jpg" /></p>
<p>5.设置cron使系统每个礼拜检查php<br />
在putty里键入<br />
[coolcode]crontab -e[/coolcode]<br />
[coolcode]@weekly /home/myusername/php-update.sh[/coolcode]<br />
编辑保存按Ctrl+X退出.<br />
myusername改成你自己的ftp用户名.</p>
<p>6.在网站目录下建立.htaccess,让php按照我们的设置来运行.<br />
putty里键入<br />
[coolcode] cd domain.com[/coolcode]<br />
转入网站目录下.<br />
然后建立.htaccess文件<br />
[coolcode]vim .htaccess[/coolcode]<br />
然后输入如下代码:<br />
[coolcode]Options +ExecCGI<br />
AddHandler php-cgi .php<br />
Action php-cgi /cgi-bin/php.cgi[/coolcode]</p>
<p>按&#8221;ESC&#8221;后输入&#8221;:wq&#8221;既完成.(不包括&#8221; &#8220;<img src="http://www.im286.com/images/smilies/wink.gif" smilieid="4" border="0" /></p>
<p><strong>注：此攻略转自<a href="http://www.im286.com/viewthread.php?tid=1842123" target="_blank">落伍</a></strong></p>
	<p style="line-height:22px;"><br/><br/>
	评论数量(13) | <a href="http://dupola.com/post/109#commentform" target="_blank">你来评论</a><br/>
	原文标题：<a href="http://dupola.com/post/109" title="[转]Dreamhost SSH 自己编辑PHP.INI(已开fopen为例)"  target="_blank">[转]Dreamhost SSH 自己编辑PHP.INI(已开fopen为例)</a><br/>
	原文地址：<a href="http://dupola.com/post/109" title="[转]Dreamhost SSH 自己编辑PHP.INI(已开fopen为例)"  target="_blank">http://dupola.com/post/109</a><br/><br/>
	&copy; <strong>版权声明：</strong> 除非特别声明，<a href="http://dupola.com">肚破惊天</a> 所有文章均为 <a href="http://dupola.com" target="_blank" title="dupola">dupola</a> 原创。默认自由转摘且遵守 <a href="http://creativecommons.org/licenses/by-nc-sa/2.5/deed.zh" title="CC" target="_blank">CC 版权协议</a>(署名-保持一致-非商业)。转摘请注明出处，并以超连接形式标明文章原始出处和作者信息。
<img src="http://c32.statcounter.com/3846473/0/c7b6894b/0/" border="0"><img src="http://img.tongji.linezing.com/5222/tongji.gif" border="0"><br/><br/>
    @dupola 在各微博平台：<a href="https://twitter.com/dupola" target="_blank">推特 Twitter（墙站）</a>、<a href="http://t.sina.com.cn/dupola"  target="_blank">新浪微博</a>、<a href="http://t.qq.com/dupola"  target="_blank">腾讯微博</a>、<a href="http://t.163.com/dupola"  target="_blank">网易微博</a><br/><br/>
</p><h3  class="related_post_title">相关日志</h3><ul class="related_post"><li><a href="http://dupola.com/post/183" title="巧用SSH做代理服务器">巧用SSH做代理服务器</a></li><li><a href="http://dupola.com/post/79" title="如何在Win主机下运行DreamHost的SSH命令">如何在Win主机下运行DreamHost的SSH命令</a></li><li><a href="http://dupola.com/post/339" title="DreamHost 邀请码3枚及其促销分析">DreamHost 邀请码3枚及其促销分析</a></li><li><a href="http://dupola.com/post/193" title="DreamHost 优惠码 ZheTeng，独立IP+500G 空间+1顶米">DreamHost 优惠码 ZheTeng，独立IP+500G 空间+1顶米</a></li><li><a href="http://dupola.com/post/180" title="有关 DreamHost 的两件事">有关 DreamHost 的两件事</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://dupola.com/post/109/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>肚破惊天 &#187; 采集 : [转]DreamHost自己编译PHP,支持采集(allow_url_fopen)</title>
		<link>http://dupola.com/post/108</link>
		<comments>http://dupola.com/post/108#comments</comments>
		<pubDate>Mon, 19 Feb 2007 18:40:54 +0000</pubDate>
		<dc:creator>dupola</dc:creator>
				<category><![CDATA[DreamHost]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[杰奇小说]]></category>
		<category><![CDATA[采集]]></category>

		<guid isPermaLink="false">http://dupola.com/post/108</guid>
		<description><![CDATA[

 DreamHost 自己编译PHP，支持采集(allow_url_fopen)
第一种方法：
1. 下载 php_update.sh 。如果是PHP5，下载 php5_update.sh；如果是 PHP4，下载 php4_update。下面以php5举例。同时下载 附件中的 .htaccess 文件
更新一下：点这里下载php5_update.sh和htaccess文件，我打包好了。
2. FTP上传文件 php5_update.sh 和 .htaccess 到相应域名的根目录
3. SSH登录到Dreamhost，具体操作参见教程六：使用Dreamhost的Shell
4. 修改文件属性为可执行，并执行
[coolcode]chmod +x php5_update.sh
./php5_update.sh[/coolcode]
5. 增加定时项，每周执行一次 php5_update.sh
[coolcode]crontab -e[/coolcode]
然后输入内容
[coolcode]@weekly /home/your-user-name/your-domain-name/php5-update.sh[/coolcode]
按Ctrl + O保存后，按Ctrl + X退出
众所周知，DH默认是不支持大部分的采集器，因为DH默认PHP的 allow_url_fopen 选项没有打开，这是DH的一个大缺陷。好在DH可以让用户自己编译PHP，打开这些选项。
编译方法：
1. 下载附件中的文件 installscript.sh，将其中的“your.domain.com”替换为你的真实域名，然后上传到你的域名目录中
2. 用shell登陆系统
3. 修改 installscript.sh 的属性为可执行：执行命令 &#8220;chmod +x installscript.sh&#8221;
4. 执行installscript.sh： ./installscript
5. 编译成功后，修改 .htaccess，使用刚才编译出的php程序来解析php文件；在 .htaccess 中添加如下内容：
[coolcode]AddHandler phpFive .php
Action phpFive /cgi-bin/php.cgi[/coolcode]
6. 修改 php.ini，该文件在 ~/your_domain_name/etc/php5/ 目录下，打开 allow_url_fileopen [...]]]></description>
			<content:encoded><![CDATA[<p>DreamHost 自己编译PHP，支持采集(allow_url_fopen)<br />
第一种方法：<br />
1. 下载 php_update.sh 。如果是PHP5，下载 <a href="http://dupola.net/files/dhhelp/php5_update.sh">php5_update.sh</a>；如果是 PHP4，下载 <a href="http://dupola.net/files/dhhelp/php4_update.sh">php4_update</a>。下面以php5举例。同时下载 附件中的 <a href="http://dupola.net/files/dhhelp/.htaccess">.htaccess</a> 文件<br />
更新一下：点<a href="http://dupola.net/files/dhhelp/htaccess.zip" target="_blank">这里下载</a>php5_update.sh和htaccess文件，我打包好了。<br />
2. FTP上传文件 php5_update.sh 和 .htaccess 到相应域名的根目录<br />
3. SSH登录到Dreamhost，具体操作参见教程六：使用Dreamhost的Shell<br />
4. 修改文件属性为可执行，并执行<br />
[coolcode]chmod +x php5_update.sh<br />
./php5_update.sh[/coolcode]<br />
5. 增加定时项，每周执行一次 php5_update.sh<br />
[coolcode]crontab -e[/coolcode]<br />
然后输入内容<br />
[coolcode]@weekly /home/your-user-name/your-domain-name/php5-update.sh[/coolcode]<br />
按Ctrl + O保存后，按Ctrl + X退出</p>
<p>众所周知，DH默认是不支持大部分的采集器，因为DH默认PHP的 allow_url_fopen 选项没有打开，这是DH的一个大缺陷。好在DH可以让用户自己编译PHP，打开这些选项。<br />
编译方法：<br />
1. 下载附件中的文件 <a href="http://dupola.net/files/dhhelp/installscript.sh">installscript.sh</a>，将其中的“your.domain.com”替换为你的真实域名，然后上传到你的域名目录中<br />
2. 用shell登陆系统<br />
3. 修改 installscript.sh 的属性为可执行：执行命令 &#8220;chmod +x installscript.sh&#8221;<br />
4. 执行installscript.sh： ./installscript<br />
5. 编译成功后，修改 .htaccess，使用刚才编译出的php程序来解析php文件；在 .htaccess 中添加如下内容：<br />
[coolcode]AddHandler phpFive .php<br />
Action phpFive /cgi-bin/php.cgi[/coolcode]<br />
6. 修改 php.ini，该文件在 ~/your_domain_name/etc/php5/ 目录下，打开 allow_url_fileopen 选项<br />
installscript.sh源码：<br />
[coolcode]#!/bin/sh<br />
# Script updated 2006-12-25 by Carl McDade (hiveminds.co.uk) to allow memory limit and freetype<br />
# Save the code to a file as *.sh<br />
# Abort on any errors<br />
set -e</p>
<p># The domain in which to install the PHP CGI script.<br />
export DOMAIN=&#8221;your.domain.com&#8221;</p>
<p># Where do you want all this stuff built? I&#8217;d recommend picking a local<br />
# filesystem.<br />
# ***Don&#8217;t pick a directory that already exists!***  We clean up after<br />
# ourselves at the end!<br />
SRCDIR=${HOME}/source</p>
<p># And where should it be installed?<br />
INSTALLDIR=${HOME}/php5</p>
<p># Set DISTDIR to somewhere persistent, if you plan to muck around with this<br />
# script and run it several times!<br />
DISTDIR=${HOME}/dist</p>
<p># Pre-download clean up!!!!<br />
rm -fr $SRCDIR $DISTDIR</p>
<p># Update version information here.<br />
PHP5=&#8221;php-5.2.0&#8243;<br />
LIBICONV=&#8221;libiconv-1.11&#8243;<br />
LIBMCRYPT=&#8221;libmcrypt-2.5.7&#8243;<br />
LIBXML2=&#8221;libxml2-2.6.27&#8243;<br />
LIBXSLT=&#8221;libxslt-1.1.18&#8243;<br />
MHASH=&#8221;mhash-0.9.7.1&#8243;<br />
ZLIB=&#8221;zlib-1.2.3&#8243;<br />
CURL=&#8221;curl-7.14.0&#8243;<br />
LIBIDN=&#8221;libidn-0.6.8&#8243;<br />
CCLIENT=&#8221;imap-2004g&#8221;<br />
CCLIENT_DIR=&#8221;imap-2004g&#8221; # Another pest!<br />
FREETYPE=&#8221;freetype-2.2.1&#8243;</p>
<p># What PHP features do you want enabled?<br />
PHPFEATURES=&#8221;&#8211;prefix=${INSTALLDIR} \<br />
&#8211;with-config-file-path=${INSTALLDIR}/etc/php5/${DOMAIN} \<br />
&#8211;enable-force-cgi-redirect \<br />
&#8211;with-xml \<br />
&#8211;with-libxml-dir=${INSTALLDIR} \<br />
&#8211;with-freetype-dir=${INSTALLDIR} \<br />
&#8211;enable-soap \<br />
&#8211;with-openssl=/usr \<br />
&#8211;with-mhash=${INSTALLDIR} \<br />
&#8211;with-mcrypt=${INSTALLDIR} \<br />
&#8211;with-zlib-dir=${INSTALLDIR} \<br />
&#8211;with-jpeg-dir=/usr \<br />
&#8211;with-png-dir=/usr \<br />
&#8211;with-gd \<br />
&#8211;enable-gd-native-ttf \<br />
&#8211;enable-memory-limit<br />
&#8211;enable-ftp \<br />
&#8211;with-exif \<br />
&#8211;enable-sockets \<br />
&#8211;enable-wddx \<br />
&#8211;with-iconv=${INSTALLDIR} \<br />
&#8211;enable-sqlite-utf8 \<br />
&#8211;enable-calendar \<br />
&#8211;with-curl=${INSTALLDIR} \<br />
&#8211;enable-mbstring \<br />
&#8211;enable-mbregex \<br />
&#8211;with-mysql=/usr \<br />
&#8211;with-mysqli \<br />
&#8211;without-pear \<br />
&#8211;with-gettext \<br />
&#8211;with-imap=${INSTALLDIR} \<br />
&#8211;with-imap-ssl=/usr&#8221;</p>
<p># &#8212;- end of user-editable bits. Hopefully! &#8212;-</p>
<p># Push the install dir&#8217;s bin directory into the path<br />
export PATH=${INSTALLDIR}/bin:$PATH</p>
<p>#setup directories<br />
mkdir -p ${SRCDIR}<br />
mkdir -p ${INSTALLDIR}<br />
mkdir -p ${DISTDIR}<br />
cd ${DISTDIR}</p>
<p># Get all the required packages<br />
wget -c http://us3.php.net/distributions/${PHP5}.tar.gz<br />
wget -c http://mirrors.usc.edu/pub/gnu/libiconv/${LIBICONV}.tar.gz<br />
wget -c http://easynews.dl.sourceforge.net/sourceforge/mcrypt/libmcrypt-2.5.7.tar.gz<br />
wget -c ftp://xmlsoft.org/libxml2/${LIBXML2}.tar.gz<br />
wget -c ftp://xmlsoft.org/libxml2/${LIBXSLT}.tar.gz<br />
wget -c http://superb-west.dl.sourceforge.net/sourceforge/mhash/${MHASH}.tar.gz<br />
wget -c http://www.zlib.net/${ZLIB}.tar.gz<br />
wget -c http://curl.haxx.se/download/${CURL}.tar.gz<br />
wget -c http://kent.dl.sourceforge.net/sourceforge/freetype/${FREETYPE}.tar.gz<br />
wget -c ftp://alpha.gnu.org/pub/gnu/libidn/${LIBIDN}.tar.gz<br />
wget -c ftp://ftp.cac.washington.edu/imap/old/${CCLIENT}.tar.Z</p>
<p>echo &#8212;&#8212;&#8212;- Unpacking downloaded archives. This process may take several minutes! &#8212;&#8212;&#8212;-</p>
<p>cd ${SRCDIR}<br />
# Unpack them all<br />
echo Extracting ${PHP5}&#8230;<br />
tar xzf ${DISTDIR}/${PHP5}.tar.gz<br />
echo Done.<br />
echo Extracting ${LIBICONV}&#8230;<br />
tar xzf ${DISTDIR}/${LIBICONV}.tar.gz<br />
echo Done.<br />
echo Extracting ${LIBMCRYPT}&#8230;<br />
tar xzf ${DISTDIR}/${LIBMCRYPT}.tar.gz<br />
echo Done.<br />
echo Extracting ${LIBXML2}&#8230;<br />
tar xzf ${DISTDIR}/${LIBXML2}.tar.gz<br />
echo Done.<br />
echo Extracting ${LIBXSLT}&#8230;<br />
tar xzf ${DISTDIR}/${LIBXSLT}.tar.gz<br />
echo Done.<br />
echo Extracting ${MHASH}&#8230;<br />
tar xzf ${DISTDIR}/${MHASH}.tar.gz<br />
echo Done.<br />
echo Extracting ${ZLIB}&#8230;<br />
tar xzf ${DISTDIR}/${ZLIB}.tar.gz<br />
echo Done.<br />
echo Extracting ${CURL}&#8230;<br />
tar xzf ${DISTDIR}/${CURL}.tar.gz<br />
echo Done.<br />
echo Extracting ${LIBIDN}&#8230;<br />
tar xzf ${DISTDIR}/${LIBIDN}.tar.gz<br />
echo Done.<br />
echo Extracting ${CCLIENT}&#8230;<br />
uncompress -cd ${DISTDIR}/${CCLIENT}.tar.Z |tar x<br />
echo Done.<br />
echo Extracting ${FREETYPE}&#8230;<br />
tar xzf ${DISTDIR}/${FREETYPE}.tar.gz<br />
echo Done.</p>
<p># Build them in the required order to satisfy dependencies.</p>
<p>#libiconv<br />
cd ${SRCDIR}/${LIBICONV}<br />
./configure &#8211;enable-extra-encodings &#8211;prefix=${INSTALLDIR}<br />
# make clean<br />
make<br />
make install</p>
<p>#libxml2<br />
cd ${SRCDIR}/${LIBXML2}<br />
./configure &#8211;with-iconv=${INSTALLDIR} &#8211;prefix=${INSTALLDIR}<br />
# make clean<br />
make<br />
make install</p>
<p>#libxslt<br />
cd ${SRCDIR}/${LIBXSLT}<br />
./configure &#8211;prefix=${INSTALLDIR} \<br />
&#8211;with-libxml-prefix=${INSTALLDIR} \<br />
&#8211;with-libxml-include-prefix=${INSTALLDIR}/include/ \<br />
&#8211;with-libxml-libs-prefix=${INSTALLDIR}/lib/<br />
# make clean<br />
make<br />
make install</p>
<p>#zlib<br />
cd ${SRCDIR}/${ZLIB}<br />
./configure &#8211;shared &#8211;prefix=${INSTALLDIR}<br />
# make clean<br />
make<br />
make install</p>
<p>#libmcrypt<br />
cd ${SRCDIR}/${LIBMCRYPT}<br />
./configure &#8211;disable-posix-threads &#8211;prefix=${INSTALLDIR}<br />
# make clean<br />
make<br />
make install</p>
<p>#libmcrypt lltdl issue!!<br />
cd  ${SRCDIR}/${LIBMCRYPT}/libltdl<br />
./configure &#8211;prefix=${INSTALLDIR} &#8211;enable-ltdl-install<br />
# make clean<br />
make<br />
make install</p>
<p>#mhash<br />
cd ${SRCDIR}/${MHASH}<br />
./configure &#8211;prefix=${INSTALLDIR}<br />
# make clean<br />
make<br />
make install</p>
<p>#freetype<br />
cd ${SRCDIR}/${FREETYPE}<br />
./configure &#8211;prefix=${INSTALLDIR}<br />
# make clean<br />
make<br />
make install</p>
<p>#libidn<br />
cd ${SRCDIR}/${LIBIDN}<br />
./configure &#8211;with-iconv-prefix=${INSTALLDIR} &#8211;prefix=${INSTALLDIR}<br />
# make clean<br />
make<br />
make install</p>
<p>#cURL<br />
cd ${SRCDIR}/${CURL}<br />
./configure &#8211;with-ssl=${INSTALLDIR} &#8211;with-zlib=${INSTALLDIR} \<br />
&#8211;with-libidn=${INSTALLDIR} &#8211;enable-ipv6 &#8211;enable-cookies \<br />
&#8211;enable-crypto-auth &#8211;prefix=${INSTALLDIR}<br />
# make clean<br />
make<br />
make install</p>
<p># c-client<br />
cd ${SRCDIR}/${CCLIENT_DIR}<br />
make ldb<br />
# Install targets are for wusses!<br />
cp c-client/c-client.a ${INSTALLDIR}/lib/libc-client.a<br />
cp c-client/*.h ${INSTALLDIR}/include</p>
<p>#PHP 5<br />
cd ${SRCDIR}/${PHP5}<br />
./configure ${PHPFEATURES}<br />
# make clean<br />
make<br />
make install</p>
<p>#copy config file<br />
mkdir -p ${INSTALLDIR}/etc/php5/${DOMAIN}<br />
cp ${SRCDIR}/${PHP5}/php.ini-dist ${INSTALLDIR}/etc/php5/${DOMAIN}/php.ini</p>
<p>#copy PHP CGI<br />
mkdir -p ${HOME}/${DOMAIN}/cgi-bin<br />
chmod 0755 ${HOME}/${DOMAIN}/cgi-bin<br />
cp ${INSTALLDIR}/bin/php ${HOME}/${DOMAIN}/cgi-bin/php.cgi<br />
rm -fr $SRCDIR $DISTDIR<br />
echo &#8212;&#8212;&#8212;- INSTALL COMPLETE! &#8212;&#8212;&#8212;-[/coolcode]<br />
参考文档：http://wiki.dreamhost.com/index.php/Installing_PHP5</p>
<p><strong>注：此文转自网络。</strong></p>
	<p style="line-height:22px;"><br/><br/>
	评论数量(19) | <a href="http://dupola.com/post/108#commentform" target="_blank">你来评论</a><br/>
	原文标题：<a href="http://dupola.com/post/108" title="[转]DreamHost自己编译PHP,支持采集(allow_url_fopen)"  target="_blank">[转]DreamHost自己编译PHP,支持采集(allow_url_fopen)</a><br/>
	原文地址：<a href="http://dupola.com/post/108" title="[转]DreamHost自己编译PHP,支持采集(allow_url_fopen)"  target="_blank">http://dupola.com/post/108</a><br/><br/>
	&copy; <strong>版权声明：</strong> 除非特别声明，<a href="http://dupola.com">肚破惊天</a> 所有文章均为 <a href="http://dupola.com" target="_blank" title="dupola">dupola</a> 原创。默认自由转摘且遵守 <a href="http://creativecommons.org/licenses/by-nc-sa/2.5/deed.zh" title="CC" target="_blank">CC 版权协议</a>(署名-保持一致-非商业)。转摘请注明出处，并以超连接形式标明文章原始出处和作者信息。
<img src="http://c32.statcounter.com/3846473/0/c7b6894b/0/" border="0"><img src="http://img.tongji.linezing.com/5222/tongji.gif" border="0"><br/><br/>
    @dupola 在各微博平台：<a href="https://twitter.com/dupola" target="_blank">推特 Twitter（墙站）</a>、<a href="http://t.sina.com.cn/dupola"  target="_blank">新浪微博</a>、<a href="http://t.qq.com/dupola"  target="_blank">腾讯微博</a>、<a href="http://t.163.com/dupola"  target="_blank">网易微博</a><br/><br/>
</p><h3  class="related_post_title">相关日志</h3><ul class="related_post"><li><a href="http://dupola.com/post/193" title="DreamHost 优惠码 ZheTeng，独立IP+500G 空间+1顶米">DreamHost 优惠码 ZheTeng，独立IP+500G 空间+1顶米</a></li><li><a href="http://dupola.com/post/183" title="巧用SSH做代理服务器">巧用SSH做代理服务器</a></li><li><a href="http://dupola.com/post/79" title="如何在Win主机下运行DreamHost的SSH命令">如何在Win主机下运行DreamHost的SSH命令</a></li><li><a href="http://dupola.com/post/109" title="[转]Dreamhost SSH 自己编辑PHP.INI(已开fopen为例)">[转]Dreamhost SSH 自己编辑PHP.INI(已开fopen为例)</a></li><li><a href="http://dupola.com/post/339" title="DreamHost 邀请码3枚及其促销分析">DreamHost 邀请码3枚及其促销分析</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://dupola.com/post/108/feed</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
	</channel>
</rss>
