如何安装Tomcat Administration web app?

来源:互联网 发布:真正的坏女人魅力知乎 编辑:程序博客网 时间:2024/05/16 12:44

如果你安装的是Tomcat5.5二进制安装程序,那么Administration web app是没有绑定到安装程序中的,需要额外下载(在Tomcat4.1中, Administration web app默认是作为Tomcat4.1安装包的一部分一起安装的)。

下面讲述的是Windows2000上面的Tomcat5.5 Administration web app安装内容,因此你安装路径名称将会随着平台的不同而略有变化,在本示例中,Tomcat 5.5.17 安装在c:\Program Files\Apache Software Foundation\Tomcat 5.5目录 (这个是我自己的CATALINA_HOME).

  1. 使用winzip或者tar命令解压下载的administration web app 文件 (如:apache-tomcat-5.5.17-admin.zip) 到一个临时目录,如:c:\temp.

  2. 复制c:\temp\apache-tomcat-5.5.17\conf\Catalina\localhost\admin.xml 文件到这个目录下c:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\Catalina\localhost.

  3. 复制整个目录c:\temp\apache-tomcat-5.5.17\server\webapps\admin到这个目录下c:\Program Files\Apache Software Foundation\Tomcat 5.5\server\webapps. 这是一个覆盖操作, 覆盖之后,就只剩下admin目录,以及该目录下的一些文件。(实际情况下,你可以只复制admin文件夹至c:\Program Files\Apache Software Foundation\Tomcat 5.5\server\webapps目录下,这样就不会覆盖原有的一些文件了)

  1. 添加一行角色配置信息到c:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\tomcat-users.xml文件中,以便你可以使用admin角色进行管理。例如:,添加下面一行到最后一行(含有</tomcat-users>的那一行)前面:

    • <user username="admin" password="makesomethingup" roles="admin,manager"/>

  2. 重启 Tomcat.。
  3. 现在你可以通过 http://localhost:8080/admin 地址访问Administration web引用了,你可能需要输入刚才添加的用户名和密码才能访问。 如果你在浏览器中仍然看到"no longer loaded" 的错误提示, 你就不得不刷新下当前页面 (在Firefox里面, 单击"刷新"按钮的同时按住shift键不放) 或者把整个浏览器重启下。

英文原文内容,原文地址:http://wiki.apache.org/tomcat/HowTo#How_do_I_install_the_Administration_web_app.3F

How do I install the Administration web app?

If you install Tomcat 5.5 binaries, the Administration web app is not bundled with it; this describes how to add the Administration web app to your Tomcat 5.5 installation. (Tomcat 4.1 comes with the Administration web app as part of the binary).

The following refers to a Tomcat 5.5 set up on Windows 2000, so your path names will be different on *nix platforms. In this example, Tomcat 5.5.17 in installed inc:\Program Files\Apache Software Foundation\Tomcat 5.5 (this is my CATALINA_HOME).

  1. Unzip or untar (be careful to use GNU tar) the file containing the administration web app files (eg.apache-tomcat-5.5.17-admin.zip) to a temporary directory, eg. c:\temp.

  2. Copy c:\temp\apache-tomcat-5.5.17\conf\Catalina\localhost\admin.xml to the directoryc:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\Catalina\localhost.

  3. Copy the entire directory tree c:\temp\apache-tomcat-5.5.17\server\webapps\admin

to the directory c:\Program Files\Apache Software Foundation\Tomcat 5.5\server\webapps. This is an overlay, so \server\webapps is just pointing you to the \server\webapps, and the admin directory with its contents will be the only thing you see added there.

  1. Add a line to your c:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\tomcat-users.xml file so that you have a user who hasadmin role. For example, add this line just before the last line (containing</tomcat-users>) of the file:

    • <user username="admin" password="makesomethingup" roles="admin,manager"/>

  2. Restart Tomcat.
  3. Now when you visit http://localhost:8080/admin you should see a page that asks for a user name and password. If you still see the "no longer loaded" error message in your browser, you must either force a full reload of the web page (in Firefox, hold down Shift key while clicking on the Reload button) or just restart your browser completely.



原创粉丝点击