Jdk1.8、centos7、vim
cd /usr/local/tomcat wget https://downloads.apache.org/tomcat/tomcat-10/v10.0.10/bin/apache-tomcat-10.0.10.tar.gz tar -zvxf apache-tomcat-10.0.10.tar.gz sh apache-tomcat-10.0.10/bin/startup.sh
到这一步就已经可以访问tomcat的welcome页面了,但是访问http://[ip地址]/manager/html出现403的话,你需要进行如下配置
vim apache-tomcat-10.0.10/conf/Catalina/localhost/manager.xml
<Context privileged="true" antiResourceLocking="false" docBase="${catalina.home}/webapps/manager"> <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" /> </Context>
# 最后添加 <role rolename="manager-gui"/> <user username="昵称" password="[密码]" roles="manager-gui"/>