修改配置tomcat-users.xml文件添加如下内容:vim /usr/local/tomcat/conf/tomcat-users.xml
<role rolename="admin"/> <role rolename="admin-gui"/> <role rolename="admin-script"/> <role rolename="manager-gui"/> <role rolename="manager-script"/> <role rolename="manager-jmx"/> <role rolename="manager-status"/> <user username="admin" password="admin" roles="admin,admin-gui,admin-script,manager-gui,manager-script,manager-jmx,manager-status"/>
tomcat8还需创建manager.xml文件:vim /usr/local/tomcat/conf/Catalina/localhost/manager.xml
<Context privileged="true" antiResourceLocking="false" docBase="${catalina.home}/webapps/manager"> <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" /> </Context>
参考博文:http://blog.csdn.net/weixian52034/article/details/53218584
时间: 2024-11-06 16:03:51