<?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>网贝&#124;BT&#039;s Home &#187; php</title>
	<atom:link href="http://webabie.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://webabie.com</link>
	<description></description>
	<lastBuildDate>Fri, 30 Dec 2011 13:23:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>在VPS上搭建LAMP环境之PHP篇</title>
		<link>http://webabie.com/install-lamp-on-vps-php/</link>
		<comments>http://webabie.com/install-lamp-on-vps-php/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 11:15:53 +0000</pubDate>
		<dc:creator>blacktulip</dc:creator>
				<category><![CDATA[博客心得]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[vps]]></category>
		<category><![CDATA[教程]]></category>

		<guid isPermaLink="false">http://webabie.com/install-lamp-on-vps-php/</guid>
		<description><![CDATA[前面我们已经讨论了在Linux VPS(或者独立Linux主机)上安装Apache以及MySQL的步骤。现在只剩下最后一步 -- 安装PHP。装好PHP之后，就可以开始安装诸如WordPress等上层的应用了。<p class="read-more"><a href="h... ]]></description>
			<content:encoded><![CDATA[<p>前面我们已经讨论了<a href="http://webabie.com/install-lamp-on-vps-apache/" target="_blank">在Linux VPS(或者独立Linux主机)上安装Apache</a>以及<a href="http://webabie.com/install-lamp-on-vps-mysql/" target="_blank">MySQL</a>的步骤。现在只剩下最后一步 &#8212; 安装PHP。装好PHP之后，就可以开始安装诸如WordPress等上层的应用了。</p>
<p>首先输入cd / 回到根目录，然后：</p>
<p><span id="more-698"></span></p>
<p><em><span style="color: #008080;">wget http://uk3.php.net/get/php-5.2.6.tar.gz/from/us.php.net/mirror          //下载php 5.2.6源代码包<br />
tar zxvf php-5.2.6.tar.gz          //解压源代码包<br />
cd php-5.2.6          //进入源代码目录</span></em></p>
<p>这几步看了前两篇文章的朋友们应该已经很熟悉了。</p>
<p>配置PHP需要libxml2这个包，用以下命令进行安装：</p>
<p><em><span style="color: #008080;">yum install libxml2-devel          //安装libxml2开发包，如果已经安装也无所谓，确认一下</span></em></p>
<p>以下正式开始配置，编译和安装：</p>
<p><em><span style="color: #008080;">./configure &#8211;with-apxs2=/usr/local/apache2/bin/apxs &#8211;with-mysql=/usr/local/mysql          //配置PHP的编译环境，现在明白为什么PHP放在MySQL后面安装了吧，因为这一步要指定MySQL的位置，如果你把MySQL安装在别的地方，这一步的参数也要做相应的修改。<br />
make          //漫长的编译<br />
make install          //很快的安装<br />
cp php.ini-dist /usr/local/lib/php.ini          //这是创建一个PHP配置文件</span></em></p>
<p>安装过程就只有这几步，接下来才是重要的，对Apache进行配置，让它认识PHP文件。又要用到vi这个命令行下的文本编辑器了。</p>
<p><em><span style="color: #008080;">vi /usr/local/apache2/conf/httpd.conf          //用vi打开apache的配置文件</span></em></p>
<p>然后输入&#8217;<em><span style="color: #008080;">?LoadModule php5&#8242;</span></em>看看有没有结果，如果没有的话，找到一行# LoadModule foo_module modules/mod_foo.so，在下面添加(按a键进入编辑模式)：</p>
<p><em><span style="color: #008080;">LoadModule php5_module        modules/libphp5.so          //添加PHP模块到Apache中。一般这步是自动完成的，不用手工添加，此处只是预防万一未能自动添加的情况。如果手工添加了，记得按ESC键退出编辑模式。</span></em></p>
<p>输入&#8217;<span style="color: #008080;"><em>?AddType application</em></span><span style="color: #000000;">&#8216;</span>查找，在现有的几行AddType下面添加两行:</p>
<p><em><span style="color: #008080;">AddType application/x-httpd-php .php .phtml          //这是让Apache认识php文件<br />
AddType applicaiton/x-httpd-php-source .phps          //让apache认识php源码文件</span></em></p>
<p>然后退出编辑模式，输入&#8217;:wq&#8217;存盘退出vi。</p>
<p><em><span style="color: #008080;">/usr/local/apache2/bin/apachectl stop<br />
/usr/local/apache2/bin/apachectl start          //这两条命令重启Apache。</span></em></p>
<p>好，所有步骤都结束了，现在我们开始测试到底装好没有。</p>
<p><em><span style="color: #008080;">cd /var/www/html          //进入网站根目录<br />
vi info.php           //创建一个叫info.php的空白文件并用vi打开</span></em></p>
<p>按a键进入编辑模式，输入下面一行内容：</p>
<p><em><span style="color: #008080;">&lt;? phpinfo(); ?&gt;</span></em></p>
<p>然后按ESC退出编辑模式，输入&#8217;:wq&#8217;存盘退出vi。</p>
<p>很好，现在打开浏览器，在地址栏输入<em><span style="color: #008080;">http://你网站的地址或ip/info.php</span></em> ，看看是不是出现长长长长的表格。如果是的话，就说明已经成功了，你可以在网页上搜索mysql，apache等单词看看情况。</p>
<p>终于大功基本告成，今天先说这么多，下次说说在这种环境下安装WordPress的注意事项。</p>
<p>参考资料: <a href="http://www.php.net/manual/en/" target="_blank">PHP手册</a>[</p>
<p class="announce">转载请注明转自《<a rel="bookmark" title="在VPS上搭建LAMP环境之PHP篇" href="http://webabie.com/install-lamp-on-vps-php/">在VPS上搭建LAMP环境之PHP篇</a>》</p><h2  class="related_post_title">也许相关的文章</h2><ul class="related_post"><li><a href="http://webabie.com/install-lamp-on-vps-sumup/" title="在VPS上搭建LAMP环境之总结篇">在VPS上搭建LAMP环境之总结篇</a></li><li><a href="http://webabie.com/install-lamp-on-vps-install-applications/" title="在VPS上搭建LAMP环境之安装WordPress篇">在VPS上搭建LAMP环境之安装WordPress篇</a></li><li><a href="http://webabie.com/install-lamp-on-vps-mysql/" title="在VPS上搭建LAMP环境之MySQL篇">在VPS上搭建LAMP环境之MySQL篇</a></li><li><a href="http://webabie.com/install-lamp-on-vps-apache/" title="在VPS上搭建LAMP环境之Apache篇">在VPS上搭建LAMP环境之Apache篇</a></li><li><a href="http://webabie.com/initializing-linode-vps/" title="VPS折腾记录">VPS折腾记录</a></li></ul><hr />
<p><small>© blacktulip for <a href="http://webabie.com">网贝|BT&#039;s Home</a>, 2008. |
<a href="http://webabie.com/install-lamp-on-vps-php/">在VPS上搭建LAMP环境之PHP篇</a> |
<a href="http://webabie.com/install-lamp-on-vps-php/#comments">2 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://webabie.com/install-lamp-on-vps-php/&title=在VPS上搭建LAMP环境之PHP篇">del.icio.us</a>
<br/>
Post tags: <a href="http://webabie.com/tag/lamp/" rel="tag">lamp</a>, <a href="http://webabie.com/tag/php/" rel="tag">php</a>, <a href="http://webabie.com/tag/vps/" rel="tag">vps</a>, <a href="http://webabie.com/tag/%e6%95%99%e7%a8%8b/" rel="tag">教程</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://webabie.com/install-lamp-on-vps-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Discuz! 6.1 final 及 Ucenter home 1.0 final 发布</title>
		<link>http://webabie.com/discuz-61-final-and-ucenter-home-10-final-released/</link>
		<comments>http://webabie.com/discuz-61-final-and-ucenter-home-10-final-released/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 09:04:42 +0000</pubDate>
		<dc:creator>blacktulip</dc:creator>
				<category><![CDATA[软件世界]]></category>
		<category><![CDATA[bbs]]></category>
		<category><![CDATA[discuz]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ucenter home]]></category>

		<guid isPermaLink="false">http://webabie.com/discuz-61-final-%e5%8f%8a-ucenter-home-10-final-%e5%8f%91%e5%b8%83/</guid>
		<description><![CDATA[康盛创想于今天早些时候发布了其旗舰产品Discuz! 6.1的最终版，新研制的仿Facebook程序Ucenter Home也随之发布了1.0版。 发布页面:  Discuz! 6.1.0 &#124; Ucenter Home 1.0 转载请注明转自《Discuz! 6.1 final 及 Uc... ]]></description>
			<content:encoded><![CDATA[<p>康盛创想于今天早些时候发布了其旗舰产品Discuz! 6.1的最终版，新研制的仿Facebook程序Ucenter Home也随之发布了1.0版。</p>
<p>发布页面:  <a href="http://www.discuz.net/thread-900313-1-1.html" target="_blank">Discuz! 6.1.0 </a>| <a href="http://www.discuz.net/thread-900309-1-1.html" target="_blank">Ucenter Home 1.0</a></p>
<p class="announce">转载请注明转自《<a rel="bookmark" title="Discuz! 6.1 final 及 Ucenter home 1.0 final 发布" href="http://webabie.com/discuz-61-final-and-ucenter-home-10-final-released/">Discuz! 6.1 final 及 Ucenter home 1.0 final 发布</a>》</p><h2  class="related_post_title">也许相关的文章</h2><ul class="related_post"><li><a href="http://webabie.com/push-better-than-pull/" title="推比拉好">推比拉好</a></li><li><a href="http://webabie.com/deformed-china-sns/" title="畸形的中国SNS，MYOP也与事无补">畸形的中国SNS，MYOP也与事无补</a></li><li><a href="http://webabie.com/install-lamp-on-vps-php/" title="在VPS上搭建LAMP环境之PHP篇">在VPS上搭建LAMP环境之PHP篇</a></li><li><a href="http://webabie.com/the-value-realtionship-between-sns-website-and-its-users/" title="关系的价值 &#8212; SNS困局随想">关系的价值 &#8212; SNS困局随想</a></li><li><a href="http://webabie.com/facebook-bans-google-friend-connect/" title="Friend Connect落花有意，Facebook流水无情">Friend Connect落花有意，Facebook流水无情</a></li></ul><hr />
<p><small>© blacktulip for <a href="http://webabie.com">网贝|BT&#039;s Home</a>, 2008. |
<a href="http://webabie.com/discuz-61-final-and-ucenter-home-10-final-released/">Discuz! 6.1 final 及 Ucenter home 1.0 final 发布</a> |
<a href="http://webabie.com/discuz-61-final-and-ucenter-home-10-final-released/#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://webabie.com/discuz-61-final-and-ucenter-home-10-final-released/&title=Discuz! 6.1 final 及 Ucenter home 1.0 final 发布">del.icio.us</a>
<br/>
Post tags: <a href="http://webabie.com/tag/bbs/" rel="tag">bbs</a>, <a href="http://webabie.com/tag/discuz/" rel="tag">discuz</a>, <a href="http://webabie.com/tag/facebook/" rel="tag">facebook</a>, <a href="http://webabie.com/tag/php/" rel="tag">php</a>, <a href="http://webabie.com/tag/ucenter-home/" rel="tag">ucenter home</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://webabie.com/discuz-61-final-and-ucenter-home-10-final-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

