jingshen 发表于 2015-8-10 11:39:40

Setting up Initial Tomcat Administration

The source : http://www.netadmintools.com/art340.html

作者写的够清楚了,偶就不多说了。^_^

There are a couple web-based administration tools that come with
Tomcat, but you have to set up the admin and manager access first. This
is done by adding a line to tomcat-users.xml:







# pwd
/opt/tomcat/conf
# vi tomcat-users.xml







Add the line with admin,manager in it:























Of course, pick a better name and password. :) Note that the paths in this article are based on the Tomcat install we did in this article. You will need to restart Tomcat for the changes to take effect:







# pwd
/opt/tomcat/bin
# ./shutdown.sh
Using CATALINA_BASE:   /opt/tomcat
Using CATALINA_HOME:   /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JAVA_HOME:       /opt/j2sdk
# ./startup.sh
Using CATALINA_BASE:   /opt/tomcat
Using CATALINA_HOME:   /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JAVA_HOME:       /opt/j2sdk
#







When we browse to http://srv-1:8080/manager/html, we can log on:




http://www.netadmintools.com/arts/tomcatadmin/logon.png




Here is the manager app:




http://www.netadmintools.com/arts/tomcatadmin/main.jpg




If we browse to http://srv-1:8080/admin/, we get another logon screen:




http://www.netadmintools.com/arts/tomcatadmin/admin.jpg




From the admin app, we can administer roles and users, as well as do other tasks:




http://www.netadmintools.com/arts/tomcatadmin/adminusers.jpg
页: [1]
查看完整版本: Setting up Initial Tomcat Administration