<?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; tomcat</title>
	<atom:link href="http://easwy.com/blog/archives/tag/tomcat/feed/" rel="self" type="application/rss+xml" />
	<link>http://easwy.com/blog</link>
	<description>关注Linux, Scala, Android, Java, 开源软件和嵌入式系统</description>
	<lastBuildDate>Mon, 12 Mar 2012 02:03:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<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。 <a href="http://easwy.com/blog/archives/install-apache-tomcat-on-debian-lenny/">Continue reading <span class="meta-nav">&#8594;</span></a><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='在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='在debian lenny上安装thinkpad t400无线驱动'>在debian lenny上安装thinkpad t400无线驱动</a></li>
<li><a href='http://easwy.com/blog/archives/subversion-configuration-in-debian-etch/' rel='bookmark' title='在debian etch中配置subversion版本管理'>在debian etch中配置subversion版本管理</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='在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='在debian lenny上安装thinkpad t400无线驱动'>在debian lenny上安装thinkpad t400无线驱动</a></li>
<li><a href='http://easwy.com/blog/archives/subversion-configuration-in-debian-etch/' rel='bookmark' title='在debian etch中配置subversion版本管理'>在debian etch中配置subversion版本管理</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>
	</channel>
</rss>

