<?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; SSH</title>
	<atom:link href="http://www.longlan.net/longlan/tag/ssh/feed" rel="self" type="application/rss+xml" />
	<link>http://www.longlan.net</link>
	<description>人生的最高境界:想不做什么就不做什么</description>
	<lastBuildDate>Tue, 23 Feb 2010 09:05:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Dreamhost主机的SS开启采集功能</title>
		<link>http://www.longlan.net/longlan/130</link>
		<comments>http://www.longlan.net/longlan/130#comments</comments>
		<pubDate>Thu, 18 Sep 2008 17:45:39 +0000</pubDate>
		<dc:creator>LongLan</dc:creator>
				<category><![CDATA[Discuz]]></category>
		<category><![CDATA[DreamHost]]></category>
		<category><![CDATA[互联网]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Supesite]]></category>
		<category><![CDATA[采集]]></category>

		<guid isPermaLink="false">http://www.longlan.net/longlan/130</guid>
		<description><![CDATA[看到好多用Dreamhost主机的同志反映自己的主机上安装的SS无法采集，原因是DH官方说因为安全问题关闭了allow_url_fopen.     不过还好有方法有自己开启allow_url_fopen，让SS成功采集，已经验证成功采... ]]></description>
			<content:encoded><![CDATA[<p>看到好多用<a href="http://longlan.cndbi.com/longlan/tag/dreamhost">Dreamhost</a>主机的同志反映自己的主机上安装的SS无法采集，原因是DH官方说因为安全问题关闭了allow_url_fopen.     <br />不过还好有方法有自己开启allow_url_fopen，让SS成功采集，已经验证成功采集！以下方法有一定的难度，视能力而行！     <br /><a href="http://longlan.cndbi.com/longlan/tag/dreamhost">Dreamhost</a> <a href="http://longlan.cndbi.com/longlan/tag/ssh">SSH</a> 自己编辑PHP.INI(已开fopen为例)     <br />1.用<a href="http://longlan.cndbi.com/longlan/tag/ssh">SSH</a>登陆空间     <br />可以使用putty.exe登陆     <br />下载地址:<a href="http://down.chinaz.com/s/7760.asp">http://down.chinaz.com/s/7760.asp</a></p>
<p><a href="http://www.longlan.net/wp-content/uploads/2008/09/12.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="439" alt="12" src="http://www.longlan.net/wp-content/uploads/2008/09/12-thumb.jpg" width="455" border="0" /></a></p>
<p> <span id="more-130"></span>
<p><a href="http://www.longlan.net/wp-content/uploads/2008/09/21.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="315" alt="2" src="http://www.longlan.net/wp-content/uploads/2008/09/2-thumb1.jpg" width="504" border="0" /></a></p>
<p>2.在你空间放置(就是你的domain.com目录下)目录建立cgi-bin文件夹   <br />用<a href="http://longlan.cndbi.com/longlan/tag/ssh">SSH</a>登陆后直接输入命令:</p>
<p>mkdir ~/[your website directory]/cgi-bin/</p>
<p>PS:[your website directory] 即 你的domain.com文件夹名字或者你自定义的文件夹名字!   <br />3.建立 php-update.sh 文件(现在<a href="http://longlan.cndbi.com/longlan/tag/ssh">SSH</a>还是在根目录)    <br />建立php-update.sh</p>
<p>vim php-update.sh</p>
<p>写入内容按下&#8221;i&#8221;键插入.   <br />此时看你的php版本    <br /><strong>php4</strong></p>
<ul>#!/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/;
<li>&#8216; &#8220;$INIFILE&#8221; </li>
</ul>
<p><strong>php5</strong></p>
<ul>#!/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/;
<li>&#8216; &#8220;$INIFILE&#8221; </li>
</ul>
<p>把[your website directory] 改成你自己的.   <br />此代码既是开启 fopen 如果你还想开启其他的自己编辑以上代码即可.    <br />直接复制然后在putty里按右键就可以复制进去!然后按下键盘的&#8217;ESC&#8217;然后输入&#8221;:wq&#8221;,既可以退出.(不包括&#8221; &#8220;    <br />4运行 php-update.sh</p>
<p>chmod +x php-update.sh   <br />./php-update.sh</p>
<p><a href="http://www.longlan.net/wp-content/uploads/2008/09/3.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="319" alt="3" src="http://www.longlan.net/wp-content/uploads/2008/09/3-thumb.jpg" width="504" border="0" /></a></p>
<p>5.设置cron使系统每个礼拜检查php   <br />在putty里键入</p>
<p>crontab -e   <br />@weekly /home/myusername/php-update.sh</p>
<p>编辑保存按Ctrl+X退出.   <br />myusername改成你自己的ftp用户名.    <br />6.在网站目录下建立.htaccess,让php按照我们的设置来运行.    <br />putty里键入</p>
<p>cd domain.com</p>
<p>转入网站目录下.   <br />然后建立.htaccess文件</p>
<p>vim .htaccess</p>
<p>然后输入如下代码:</p>
<ul>Options +ExecCGI AddHandler php-cgi .php   <br />Action php-cgi /cgi-bin/php.cgi</ul>
<p>按&#8221;ESC&#8221;后输入&#8221;:wq&#8221;既完成.(不包括&#8221; &#8220;   <br />需要的同志拿去，希望对你们有所帮助！有什么问题可以回帖留言！    <br />（教程资料来源网络）</p>

	标签：<a href="http://www.longlan.net/longlan/tag/dreamhost" title="DreamHost" rel="tag">DreamHost</a>, <a href="http://www.longlan.net/longlan/tag/ssh" title="SSH" rel="tag">SSH</a>, <a href="http://www.longlan.net/longlan/tag/supesite" title="Supesite" rel="tag">Supesite</a>, <a href="http://www.longlan.net/longlan/tag/%e4%ba%92%e8%81%94%e7%bd%91" title="互联网" rel="tag">互联网</a>, <a href="http://www.longlan.net/longlan/tag/%e9%87%87%e9%9b%86" title="采集" rel="tag">采集</a><br />

	<h4>相关日志</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.longlan.net/longlan/18" title="网站&hellip;网站&hellip;网站&hellip; (2008-09-18)">网站&hellip;网站&hellip;网站&hellip;</a> (0)</li>
	<li><a href="http://www.longlan.net/longlan/210" title="终于回来了，最近真是背的可以&hellip; (2008-09-19)">终于回来了，最近真是背的可以&hellip;</a> (4)</li>
	<li><a href="http://www.longlan.net/longlan/24" title="来自Dreamhost关于服务器集群&ldquo;blingy&rdquo; (2008-09-18)">来自Dreamhost关于服务器集群&ldquo;blingy&rdquo;</a> (0)</li>
	<li><a href="http://www.longlan.net/longlan/17" title="手记 (2008-09-18)">手记</a> (0)</li>
	<li><a href="http://www.longlan.net/longlan/96" title="X Space 4.0 使用教程! (2008-09-19)">X Space 4.0 使用教程!</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.longlan.net/longlan/130/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
