https://blog.csdn.net/huryer/article/details/79146926
1.配置用户
编辑用户配置文件:$CATALINA_BASE/conf/tomcat-users.xml
----------
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<user username="myName" password="myPwd" roles="manager-gui"/>
<user username="myName_script" password="myPwd" roles="manager-script"/>
<user username="myName_jmx" password="myPwd" roles="manager-jmx"/>
----------
添加完成上述用户后,就可以登录manager进行配置管理
2.远程访问权限
默认情况,manger仅支持本地访问,如果需要远程访问,需要进行如下设置,打开 manager.xml ,文件地址如下:
$CATALINA_BASE/conf/Catalina/localhost/manager.xml
编辑文件内容如下,允许127.0.0.1访问,和192.168.0.1两个IP地址访问:
----------
<?xml version="1.0" encoding="UTF-8"?>
<Context privileged="true" antiResourceLocking="false"
docBase="${catalina.home}/webapps/manager">
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127.0.0.1|192.168.0.1" />
</Context>
----------