0、安装JDK
1、下载tomcat8.5
官网:https://tomcat.apache.org/download-80.cgi
下载地址:https://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v8.5.54/bin/apache-tomcat-8.5.54.tar.gz
centos 下载命令:curl -O https://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v8.5.54/bin/apache-tomcat-8.5.54.tar.gz
解压:tar -zxvf apache-tomcat-8.5.54.tar.gz
2、配置xml
进入conf文件夹配置tomcat-users.xml:
代码语言:javascript复制<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<role rolename="admin-gui"/>
<role rolename="admin-script"/>
<user username="admin" password="123456" roles="manager-gui,manager-script,manager-jmx,manager-status,admin-gui,admin-script"/>
配置host-manager远程访问:
在apache-tomcat-8.5.24/webapps/host-manager/META-INF/文件夹下找到content.xml:
代码语言:javascript复制修改
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="127.d .d .d |::1|0:0:0:0:0:0:0:1" />
为:
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="d .d .d .d |::1|0:0:0:0:0:0:0:1" />
配置完成,适用于8.5