<?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; Web开发</title>
	<atom:link href="http://easwy.com/blog/archives/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://easwy.com/blog</link>
	<description>关注Linux, Java, 开源软件和嵌入式系统</description>
	<lastBuildDate>Sun, 07 Mar 2010 10:00:00 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>使用mvn eclipse:eclipse生成eclipse工程文件失败</title>
		<link>http://easwy.com/blog/archives/maven-build-eclipse-project-failed/</link>
		<comments>http://easwy.com/blog/archives/maven-build-eclipse-project-failed/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 06:20:35 +0000</pubDate>
		<dc:creator>Easwy</dc:creator>
				<category><![CDATA[Web开发]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://easwy.com/blog/?p=1003</guid>
		<description><![CDATA[刚刚使用mvn eclipse:eclipse生成eclipse工程文件失败，maven提示：
Request to merge when 'filtering' is not identical

<div class="fixed"></div><div id="related_posts"><h3  class="related_post_title">相关文章</h3><ul class="related_post"><li><a href='http://easwy.com/blog/archives/wordpress-feed-error/' rel='bookmark' title='Permanent Link: wordpress的feed出错!'>wordpress的feed出错!</a></li>
<li><a href='http://easwy.com/blog/archives/vim-taglist-plugin-not-work-after-installing-eclim/' rel='bookmark' title='Permanent Link: 解决安装Eclim后Vim Taglist插件工作不正常的问题'>解决安装Eclim后Vim Taglist插件工作不正常的问题</a></li>
<li><a href='http://easwy.com/blog/archives/set-file-directory-attribute-for-linux-samba/' rel='bookmark' title='Permanent Link: Linux使用笔记: 设置Samba服务器中新建文件/目录的权限'>Linux使用笔记: 设置Samba服务器中新建文件/目录的权限</a></li>
</div><div class="fixed"></div>]]></description>
			<content:encoded><![CDATA[<p>
    刚刚使用下面的命令生成eclipse的工程文件：
  </p>
<pre class="programlisting">
mvn eclipse:eclipse </pre>
<p>
    但maven提示：
  </p>
<pre class="programlisting">
$ mvn eclipse:eclipse
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building AppFuse Struts 2 Application
[INFO]    task-segment: [eclipse:eclipse]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing eclipse:eclipse
[INFO] [aspectj:compile {execution: default}]
[INFO] [native2ascii:native2ascii {execution: native2ascii-utf8}]
[INFO] [native2ascii:native2ascii {execution: native2ascii-8859_1}]
[INFO] [eclipse:eclipse {execution: default-cli}]
[INFO] Adding support for WTP version 1.5.
[INFO] Using Eclipse Workspace: null
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAINER
[INFO] Resource directory's path matches an existing source directory. Resources will be merged with the source directory src/main/resources
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Request to merge when 'filtering' is not identical. Original=resource src/main/resources: output=target/classes, include=[], exclude=[ApplicationResources_de.properties|ApplicationResources_fr.properties|ApplicationResources_ko.properties|ApplicationResources_nl.properties|ApplicationResources_no.properties|ApplicationResources_pt*.properties|ApplicationResources_tr.properties|ApplicationResources_zh*.properties|applicationContext-resources.xml|struts.xml|**/*.java], test=false, filtering=true, merging with=resource src/main/resources: output=target/classes, include=[applicationContext-resources.xml|struts.xml], exclude=[**/*.java], test=false, filtering=false
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10 seconds
[INFO] Finished at: Tue Jan 19 13:10:19 CST 2010
[INFO] Final Memory: 28M/50M
[INFO] ------------------------------------------------------------------------ </pre>
<p>
    在网上搜了一下，似乎是maven的2.7版本eclipse插件的问题，使用下面的命令可以解决此问题：
  </p>
<pre class="programlisting">
mvn org.apache.maven.plugins:maven-eclipse-plugin:2.6:eclipse </pre>
<p>
    上面的命令会调用maven eclipse插件的2.6版本来生成eclipse项目文件，可以build正常。
  </p>
<p>
    更多内容，请阅读<a class="ulink" href="http://easwy.com/blog/" target="_top">Easwy的博客</a>上的其它文章。
  </p>
<p><span class="bold"><strong>[ 参考文档 ]</strong></span></p>
<div class="itemizedlist">
<ul class="itemizedlist" type="disc">
<li class="listitem">
      <a class="ulink" href="http://forums.atlassian.com/thread.jspa?threadID=34952" target="_top">eclipse:eclipse failing </a>
    </li>
</ul>
</div>
<div class="posturl">
<p><span class="bold"><strong>原创文章，请阅读页脚的<a href="#license">许可方式</a>，转载请注明：</strong></span>转载自<a class="link" href="http://easwy.com/blog/" target="_top">易水博客</a> [ <a class="link" href="http://easwy.com/blog/" target="_top">http://easwy.com/blog/</a> ]</p>
<p><span class="bold"><strong>本文链接地址:</strong></span> <a class="link" href="http://easwy.com/blog/archives/maven-build-eclipse-project-failed/" target="_top">http://easwy.com/blog/archives/maven-build-eclipse-project-failed/</a></p>
</div>
<p style="margin-top: 0; margin-bottom: 15px; color: #888888; font-size: 80%; font-style: italic">文章的脚注信息由WordPress的<a href="http://easwy.com/blog/wordpress/wp-posturl/" style="color: #8888FF; text-decoration: underline;">wp-posturl插件</a>自动生成</p>


<div class="fixed"></div><div id="related_posts"><h3  class="related_post_title">相关文章</h3><ul class="related_post"><li><a href='http://easwy.com/blog/archives/wordpress-feed-error/' rel='bookmark' title='Permanent Link: wordpress的feed出错!'>wordpress的feed出错!</a></li>
<li><a href='http://easwy.com/blog/archives/vim-taglist-plugin-not-work-after-installing-eclim/' rel='bookmark' title='Permanent Link: 解决安装Eclim后Vim Taglist插件工作不正常的问题'>解决安装Eclim后Vim Taglist插件工作不正常的问题</a></li>
<li><a href='http://easwy.com/blog/archives/set-file-directory-attribute-for-linux-samba/' rel='bookmark' title='Permanent Link: Linux使用笔记: 设置Samba服务器中新建文件/目录的权限'>Linux使用笔记: 设置Samba服务器中新建文件/目录的权限</a></li>
</div><div class="fixed"></div>]]></content:encoded>
			<wfw:commentRss>http://easwy.com/blog/archives/maven-build-eclipse-project-failed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在Debian Lenny上安装Apache Tomcat</title>
		<link>http://easwy.com/blog/archives/install-apache-tomcat-on-debian-lenny/</link>
		<comments>http://easwy.com/blog/archives/install-apache-tomcat-on-debian-lenny/#comments</comments>
		<pubDate>Fri, 01 May 2009 07:41:18 +0000</pubDate>
		<dc:creator>Easwy</dc:creator>
				<category><![CDATA[Web开发]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://easwy.com/blog/?p=870</guid>
		<description><![CDATA[本文主要介绍如何在Debian Lenny上安装Apache Tomcat。

<div class="fixed"></div><div id="related_posts"><h3  class="related_post_title">相关文章</h3><ul class="related_post"><li><a href='http://easwy.com/blog/archives/install_apache_php_mysql_wordpress_on_debian_lenny/' rel='bookmark' title='Permanent Link: 在Debian Lenny上安装Apache2，PHP5，MySQL5, WordPress&#8230;'>在Debian Lenny上安装Apache2，PHP5，MySQL5, WordPress&#8230;</a></li>
<li><a href='http://easwy.com/blog/archives/thinkpad_t400_wireless_driver_for_debian_lenny/' rel='bookmark' title='Permanent Link: 在debian lenny上安装thinkpad t400无线驱动'>在debian lenny上安装thinkpad t400无线驱动</a></li>
<li><a href='http://easwy.com/blog/archives/upgrade_debian_etch_to_lenny/' rel='bookmark' title='Permanent Link: 升级Debian Etch(4.0)到Debian Lenny(5.0)'>升级Debian Etch(4.0)到Debian Lenny(5.0)</a></li>
</div><div class="fixed"></div>]]></description>
			<content:encoded><![CDATA[<p>
    以下主要参考了文章<a class="ulink" href="http://www.debianadmin.com/how-to-setup-apache-tomcat-55-on-debian-etch.html" target="_top">How to setup Apache Tomcat 5.5 on Debian Etch</a>。
  </p>
<p>
    首先，需要安装java JDK。可以直接到<a class="ulink" href="http://www.sun.com/" target="_top">sun的网站</a>上下载(现在应该叫Oracle了，最近这些天的事，Sigh!)，也可以在Debian仓库中下载。本文介绍由Debian仓库下载的方法。
  </p>
<p>
    打开<span class="emphasis"><em>/etc/apt/sources.list</em></span>文件，在此文件中加入下面的源：
  </p>
<pre class="programlisting">
# for sun-java packages in unstable
deb http://ftp.debian.org/debian/ unstable non-free
deb-src http://ftp.debian.org/debian/ unstable non-free </pre>
<p>
    保存并退出，然后用下面的命令更新一下源：
  </p>
<pre class="programlisting">

aptitude update </pre>
<p>
    然后就可以下载java JDK6了：
  </p>
<pre class="programlisting">
aptitude install sun-java6-jdk </pre>
<p>
    关于Apache web server的安装方法就不再描述了，可以参考文章<a class="ulink" href="http://easwy.com/blog/archives/install_apache_php_mysql_wordpress_on_debian_lenny/" target="_top">在Debian Lenny上安装Apache2，PHP5，MySQL5, WordPress…</a>。接下来我们安装tomcat：
  </p>
<pre class="programlisting">
aptitude install tomcat5.5 tomcat5.5-admin tomcat5.5-webapps </pre>
<p>
    安装完后，在浏览器中输入<span class="bold"><strong>http://localhost:8180/</strong></span>，如果你能看到Apache Tomcat/5.5的页面，说明你的tomcat已经安装好了。我在输入上述地址时，有时会出现访问异常，不过刷新一下又可以访问了，还不清楚是什么原因。
  </p>
<p>
    接下来，我们需要一个用户，使之具有admin和manager权限，在本例中我们把admin和manager权限赋予用户tomcat。
  </p>
<p>    首先停用tomcat服务：
  </p>
<pre class="programlisting">
/etc/init.d/tomcat5.5 stop </pre>
<p>
    接下来编辑文件<span class="emphasis"><em> /var/lib/tomcat5.5/conf/tomcat-users.xml </em></span>，修改文件内容如下：
  </p>
<pre class="programlisting">

&lt;?xml version='1.0' encoding='utf-8'?&gt;
&lt;tomcat-users&gt;
  &lt;role rolename="admin"/&gt;
  &lt;role rolename="manager"/&gt;
  &lt;role rolename="tomcat"/&gt;
  &lt;user username="tomcat" password=”tomcatpassword” roles="tomcat,admin,manager"/&gt;

&lt;/tomcat-users&gt;
       </pre>
<p>
    保存退出后，重新启动tomcat服务：
  </p>
<pre class="programlisting">
/etc/init.d/tomcat5.5 start </pre>
<p>
    现在，就可以访问<span class="bold"><strong>http://localhost:8180/manager/html</strong></span>来管理tomcat了，用户名为tomcat，密码为tomcatpassword。
  </p>
<div class="posturl">
<p><span class="bold"><strong>原创文章，请阅读页脚的<a href="#license">许可方式</a>，转载请注明：</strong></span>转载自<a class="link" href="http://easwy.com/blog/" target="_top">易水博客</a> [ <a class="link" href="http://easwy.com/blog/" target="_top">http://easwy.com/blog/</a> ]</p>
<p><span class="bold"><strong>本文链接地址:</strong></span> <a class="link" href="http://easwy.com/blog/archives/install-apache-tomcat-on-debian-lenny/" target="_top">http://easwy.com/blog/archives/install-apache-tomcat-on-debian-lenny/</a></p>
</div>
<p style="margin-top: 0; margin-bottom: 15px; color: #888888; font-size: 80%; font-style: italic">文章的脚注信息由WordPress的<a href="http://easwy.com/blog/wordpress/wp-posturl/" style="color: #8888FF; text-decoration: underline;">wp-posturl插件</a>自动生成</p>


<div class="fixed"></div><div id="related_posts"><h3  class="related_post_title">相关文章</h3><ul class="related_post"><li><a href='http://easwy.com/blog/archives/install_apache_php_mysql_wordpress_on_debian_lenny/' rel='bookmark' title='Permanent Link: 在Debian Lenny上安装Apache2，PHP5，MySQL5, WordPress&#8230;'>在Debian Lenny上安装Apache2，PHP5，MySQL5, WordPress&#8230;</a></li>
<li><a href='http://easwy.com/blog/archives/thinkpad_t400_wireless_driver_for_debian_lenny/' rel='bookmark' title='Permanent Link: 在debian lenny上安装thinkpad t400无线驱动'>在debian lenny上安装thinkpad t400无线驱动</a></li>
<li><a href='http://easwy.com/blog/archives/upgrade_debian_etch_to_lenny/' rel='bookmark' title='Permanent Link: 升级Debian Etch(4.0)到Debian Lenny(5.0)'>升级Debian Etch(4.0)到Debian Lenny(5.0)</a></li>
</div><div class="fixed"></div>]]></content:encoded>
			<wfw:commentRss>http://easwy.com/blog/archives/install-apache-tomcat-on-debian-lenny/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>重设MySQL root密码</title>
		<link>http://easwy.com/blog/archives/reset_mysql_root_password/</link>
		<comments>http://easwy.com/blog/archives/reset_mysql_root_password/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 13:05:03 +0000</pubDate>
		<dc:creator>Easwy</dc:creator>
				<category><![CDATA[Web开发]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://easwy.com/blog/?p=763</guid>
		<description><![CDATA[ 在安装MySQL时，随便设了一个密码，现在怎么也想不起来了，只好重设MySQL的root密码。
在网上搜到一篇文章，按照文章里的办法恢复成功。把步骤记录如下。

<div class="fixed"></div><div id="related_posts"><h3  class="related_post_title">相关文章</h3><ul class="related_post"><li><a href='http://easwy.com/blog/archives/install_apache_php_mysql_wordpress_on_debian_lenny/' rel='bookmark' title='Permanent Link: 在Debian Lenny上安装Apache2，PHP5，MySQL5, WordPress&#8230;'>在Debian Lenny上安装Apache2，PHP5，MySQL5, WordPress&#8230;</a></li>
<li><a href='http://easwy.com/blog/archives/install-apache-tomcat-on-debian-lenny/' rel='bookmark' title='Permanent Link: 在Debian Lenny上安装Apache Tomcat'>在Debian Lenny上安装Apache Tomcat</a></li>
<li><a href='http://easwy.com/blog/archives/where-is-vimrc/' rel='bookmark' title='Permanent Link: vi/vim使用入门: vimrc在哪儿?'>vi/vim使用入门: vimrc在哪儿?</a></li>
</div><div class="fixed"></div>]]></description>
			<content:encoded><![CDATA[<p>
    在安装MySQL时，随便设了一个密码，现在怎么也想不起来了，只好重设MySQL的root密码。
  </p>
<p>
    在网上搜到一篇文章：<a class="ulink" href="http://www.debian-administration.org/articles/442" target="_top">Resetting a forgotten MySQL root password</a>，按照文章里的办法恢复成功。把步骤记录如下。
  </p>
<p>
    首先停止MySQL服务：
  </p>
<pre class="screen">
    # /etc/init.d/mysql stop
    Stopping MySQL database server: mysqld.
  </pre>
<p>    接下来，使用<span class="command"><strong>mysqld_safe</strong></span>命令在后台启动MySQL服务器，这里使用了<span class="emphasis"><em>&#8211;skip-grant-tables</em></span>选项，允许不使用密码连接MySQL数据库：
  </p>
<pre class="screen">
    # /usr/bin/mysqld_safe --skip-grant-tables &amp;
    [1] 5933
    nohup: ignoring input and redirecting stderr to stdout
    Starting mysqld daemon with databases from /var/lib/mysql
    mysqld_safe[5972]: started
  </pre>
<p>
    接下来，登录数据库，并更新root用户的密码：
  </p>
<pre class="screen">
    # mysql --user=root mysql
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A

    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 1
    Server version: 5.0.51a-24 (Debian)

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql&gt; update user set Password=PASSWORD('<span class="bold"><strong>new-password-here</strong></span>') WHERE User='root';
    Query OK, 3 rows affected (0.00 sec)
    Rows matched: 3  Changed: 3  Warnings: 0

    mysql&gt; flush privileges;
    Query OK, 0 rows affected (0.00 sec)

    mysql&gt; exit
    Bye
  </pre>
<p>    现在，把<span class="emphasis"><em>mysqld_safe</em></span>切换到前台，并使用<span class="command"><strong>CTRL-C</strong></span>结束它的运行：
  </p>
<pre class="screen">
    # fg
    /usr/bin/mysqld_safe --skip-grant-tables
    ^C
    STOPPING server from pid file /var/run/mysqld/mysqld.pid
    mysqld_safe[6005]: ended
  </pre>
<p>
    然后重新启动MySQL服务：
  </p>
<pre class="screen">
    # /etc/init.d/mysql start
    Starting MySQL database server: mysqld.
    Checking for corrupt, not cleanly closed and upgrade needing tables..
  </pre>
<p>
    现在，就可以使用新设置的root连接数据库了：
  </p>
<pre class="screen">

    # mysql --user=root --pass=new-passwd-here
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 681
    Server version: 5.0.51a-24 (Debian)

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql&gt; quit
    Bye
  </pre>
<div class="posturl">
<p><span class="bold"><strong>原创文章，请阅读页脚的<a href="#license">许可方式</a>，转载请注明：</strong></span>转载自<a class="link" href="http://easwy.com/blog/" target="_top">易水博客</a> [ <a class="link" href="http://easwy.com/blog/" target="_top">http://easwy.com/blog/</a> ]</p>
<p><span class="bold"><strong>本文链接地址:</strong></span> <a class="link" href="http://easwy.com/blog/archives/reset_mysql_root_password/" target="_top">http://easwy.com/blog/archives/reset_mysql_root_password/</a></p>
</div>
<p style="margin-top: 0; margin-bottom: 15px; color: #888888; font-size: 80%; font-style: italic">文章的脚注信息由WordPress的<a href="http://easwy.com/blog/wordpress/wp-posturl/" style="color: #8888FF; text-decoration: underline;">wp-posturl插件</a>自动生成</p>


<div class="fixed"></div><div id="related_posts"><h3  class="related_post_title">相关文章</h3><ul class="related_post"><li><a href='http://easwy.com/blog/archives/install_apache_php_mysql_wordpress_on_debian_lenny/' rel='bookmark' title='Permanent Link: 在Debian Lenny上安装Apache2，PHP5，MySQL5, WordPress&#8230;'>在Debian Lenny上安装Apache2，PHP5，MySQL5, WordPress&#8230;</a></li>
<li><a href='http://easwy.com/blog/archives/install-apache-tomcat-on-debian-lenny/' rel='bookmark' title='Permanent Link: 在Debian Lenny上安装Apache Tomcat'>在Debian Lenny上安装Apache Tomcat</a></li>
<li><a href='http://easwy.com/blog/archives/where-is-vimrc/' rel='bookmark' title='Permanent Link: vi/vim使用入门: vimrc在哪儿?'>vi/vim使用入门: vimrc在哪儿?</a></li>
</div><div class="fixed"></div>]]></content:encoded>
			<wfw:commentRss>http://easwy.com/blog/archives/reset_mysql_root_password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在Debian Lenny上安装Apache2，PHP5，MySQL5, WordPress&#8230;</title>
		<link>http://easwy.com/blog/archives/install_apache_php_mysql_wordpress_on_debian_lenny/</link>
		<comments>http://easwy.com/blog/archives/install_apache_php_mysql_wordpress_on_debian_lenny/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 05:40:38 +0000</pubDate>
		<dc:creator>Easwy</dc:creator>
				<category><![CDATA[Web开发]]></category>
		<category><![CDATA[开源软件]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://easwy.com/blog/?p=772</guid>
		<description><![CDATA[ 这几天访问Easwy的博客非常慢，在上面调试程序变成了痛苦的折磨。于是干脆在自己的笔记本上安装一个Web服务器来调试吧。
我笔记本上安装了Debian Lenny，使用Debian确实是省心又省力，基本你只需要会用aptitude install就可以了，其它的事情，Debian全帮你做好了。在Debian上安装Apache Web服务器以及PHP5和MySQL非常简单，只需要按照下面的步骤...

<div class="fixed"></div><div id="related_posts"><h3  class="related_post_title">相关文章</h3><ul class="related_post"><li><a href='http://easwy.com/blog/archives/install-apache-tomcat-on-debian-lenny/' rel='bookmark' title='Permanent Link: 在Debian Lenny上安装Apache Tomcat'>在Debian Lenny上安装Apache Tomcat</a></li>
<li><a href='http://easwy.com/blog/archives/subversion-configuration-in-debian-etch/' rel='bookmark' title='Permanent Link: 在debian etch中配置subversion版本管理'>在debian etch中配置subversion版本管理</a></li>
<li><a href='http://easwy.com/blog/archives/thinkpad_t400_wireless_driver_for_debian_lenny/' rel='bookmark' title='Permanent Link: 在debian lenny上安装thinkpad t400无线驱动'>在debian lenny上安装thinkpad t400无线驱动</a></li>
</div><div class="fixed"></div>]]></description>
			<content:encoded><![CDATA[<p>
    这几天<a class="ulink" href="http://easwy.com/blog/archives/please_tell_me_your_access_speed/" target="_top">访问Easwy的博客非常慢</a>，在上面调试程序变成了痛苦的折磨。于是干脆在自己的笔记本上安装一个Web服务器来调试吧。
  </p>
<p>
    我笔记本上<a class="ulink" href="http://easwy.com/blog/archives/debian-lenny-installation-on-thinkpad-t400/" target="_top">安装了Debian Lenny</a>，使用Debian确实是省心又省力，基本你只需要会用<span class="command"><strong>aptitude install</strong></span>就可以了，其它的事情，Debian全帮你做好了。在Debian上安装Apache Web服务器以及PHP5和MySQL非常简单，只需要按照下面的步骤：
  </p>
<p>安装Apache2:</p>
<pre class="programlisting">
aptitude install apache2 </pre>
<p>
    这件命令安装apache服务器，安装完成后，Apache服务器的配置文件在<span class="bold"><strong>/etc/apache2/</strong></span>，缺省的web服务器根目录在<span class="bold"><strong>/var/www/</strong></span>，安装完后，你在浏览器的地址栏输入<span class="emphasis"><em>http://localhost/</em></span>，如果可以看到<span class="bold"><strong>It works!</strong></span>这样的内容，那么你的web服务器已经运行起来了。
  </p>
<p>
    接下来安装PHP5和MySQL5、Curl(HTTP工具)、IMAP(邮件检查)、GD (编辑和创建图像)：
  </p>
<pre class="programlisting">
aptitude install libapache2-mod-php5 php5-curl php5-gd php5-imap php5-mcrypt php5-mysql php5-tidy </pre>
<p>
    接下来安装MySQL5服务器和客户端：
  </p>
<pre class="programlisting">
aptitude install mysql-server mysql-client </pre>
<p>
    MySQL的配置文件在<span class="bold"><strong>/etc/mysql/my.cnf</strong></span>，在安装MySQL服务器的时候，会要求你输入root密码。
  </p>
<p>
    最后，安装PHPMyAdmin工具：
  </p>
<pre class="programlisting">
aptitude install phpmyadmin </pre>
<p>
    PHPMyAdmin会自动配置Apache服务器，安装完后，可以直接输入<span class="bold"><strong>http://localhost/phpmyadmin/</strong></span>来访问PHPMyAdMin。
  </p>
<p>
    我们可以查看一下PHP的信息，以确信PHP已经运行起来了：
  </p>
<p>
    使用编辑器输入以下内容，把它保存成<span class="bold"><strong>/var/www/phpinfo.php</strong></span>：
  </p>
<pre class="programlisting">
&lt;?php phpinfo(); ?&gt; </pre>
<p>
    然后在浏览器地址栏输入<span class="bold"><strong>http://localhost/phpinfo.php</strong></span>，你就可以看到PHP有关的配置信息。
  </p>
<p>
    接下来安装WordPress程序，安装步骤网上很多，不再详述。
  </p>
<p>
    出于安全起见，不打算使用MySQL中的root用户来访问PHP的数据库，所以使用PHPMyAdmin(访问方法见上)专门添加了一个数据库用户wordpress，并创建一个名为wordpressdb的数据库，给予wordpress用户对wordpressdb数据库的完全控制权。
  </p>
<p>
    创建完数据库后，把WordPress拷贝到/var/www/wordpress/目录下，修改配置文件wp-config.php，主要是配置数据库信息，然后到下面的地址完成安装：
  </p>
<pre class="programlisting">
http://localhost/wordpress/wp-admin/install.php </pre>
<p>
    现在，去访问你自己的WordPress吧。Everything is OK!
  </p>
<p>
    需要说明一下：
  </p>
<p>
    Debian Lenny中的缺省web server缺省使用www-data用户运行，所以，最好使用<span class="command"><strong>chown -R www-data.www-data /var/www/wordpress</strong></span>命令把WordPress目录的属主改为www-data。有些程序要求对目录有读写权限，其实就是希望www-data用户对目录有读写权限。
  </p>
<div class="section" lang="zh-CN">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="id3843594"></a>参考文档</h2>
</div>
</div>
</div>
<div class="itemizedlist">
<ul type="disc">
<li><a class="ulink" href="http://www.arkinex.com/guides/25/installing-apache2-mysql5-and-php5-on-debian-linux/" target="_top">Installing Apache2, Mysql5 and PHP5 on Debian Linux</a></li>
</ul>
</div>
</div>
<div class="posturl">
<p><span class="bold"><strong>原创文章，请阅读页脚的<a href="#license">许可方式</a>，转载请注明：</strong></span>转载自<a class="link" href="http://easwy.com/blog/" target="_top">易水博客</a> [ <a class="link" href="http://easwy.com/blog/" target="_top">http://easwy.com/blog/</a> ]</p>
<p><span class="bold"><strong>本文链接地址:</strong></span> <a class="link" href="http://easwy.com/blog/archives/install_apache_php_mysql_wordpress_on_debian_lenny/" target="_top">http://easwy.com/blog/archives/install_apache_php_mysql_wordpress_on_debian_lenny/</a></p>
</div>
<p style="margin-top: 0; margin-bottom: 15px; color: #888888; font-size: 80%; font-style: italic">文章的脚注信息由WordPress的<a href="http://easwy.com/blog/wordpress/wp-posturl/" style="color: #8888FF; text-decoration: underline;">wp-posturl插件</a>自动生成</p>


<div class="fixed"></div><div id="related_posts"><h3  class="related_post_title">相关文章</h3><ul class="related_post"><li><a href='http://easwy.com/blog/archives/install-apache-tomcat-on-debian-lenny/' rel='bookmark' title='Permanent Link: 在Debian Lenny上安装Apache Tomcat'>在Debian Lenny上安装Apache Tomcat</a></li>
<li><a href='http://easwy.com/blog/archives/subversion-configuration-in-debian-etch/' rel='bookmark' title='Permanent Link: 在debian etch中配置subversion版本管理'>在debian etch中配置subversion版本管理</a></li>
<li><a href='http://easwy.com/blog/archives/thinkpad_t400_wireless_driver_for_debian_lenny/' rel='bookmark' title='Permanent Link: 在debian lenny上安装thinkpad t400无线驱动'>在debian lenny上安装thinkpad t400无线驱动</a></li>
</div><div class="fixed"></div>]]></content:encoded>
			<wfw:commentRss>http://easwy.com/blog/archives/install_apache_php_mysql_wordpress_on_debian_lenny/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
