debian tomcat6安装及其配置

apt-get install tomcat6 tomcat6-admin tomcat6-docs tomcat6-examples mod_jk

修改:

/etc/tomcat6/tomcat-users.xml

加入管理员admin/admin

vim /etc/tomcat6/tomcat-users.xml
下加入


别忘了将

去掉。
重新启动apache2 tomcat6
/etc/init.d/apache2 restart
/etc/init.d/tomcat6 restart

访问:
http://localhost:8080
It works !

If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations!

This is the default Tomcat home page. It can be found on the local filesystem at: /var/lib/tomcat6/webapps/ROOT/index.html

Tomcat6 veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA_HOME in /usr/share/tomcat6 and CATALINA_BASE in /var/lib/tomcat6, following the rules from /usr/share/doc/tomcat6-common/RUNNING.txt.gz.

You might consider installing the following packages, if you haven't already done so:

tomcat6-docs: This package installs a web application that allows to browse the Tomcat 6 documentation locally. Once installed, you can access it by clicking here.

tomcat6-examples: This package installs a web application that allows to access the Tomcat 6 Servlet and JSP examples. Once installed, you can access it by clicking here.

tomcat6-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the manager webapp and the host-manager webapp.

NOTE: For security reasons, using the manager webapp is restricted to users with role "manager". The host-manager webapp is restricted to users with role "admin". Users are defined in /etc/tomcat6/tomcat-users.xml.

管理界面:

http://localhost:8080/manager/html

默认web root 在/var/lib/tomcat6/webapps/ROOT/index.html

文档:

http://localhost:8080/docs/

例子:

http://localhost:8080/examples/