目录
1.Tomcat安装
2.Tomcat远程管理
1.Tomcat安装
下载安装包并解压
tar xf apache-tomcat-7.0.54.tar.gz -C /usr/local/apache-tomcat_7.0.54/
tomcat启停
启动
./startup.sh
停止
./shutdown.sh
2.Tomcat远程管理
找到tomcat文件夹中webapps/manager/META-INF/context.xml
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" />
<Manager sessionAttributeValueClassNameFilter="java\.lang\.(?:Boolean|Integer|Long|Number|String)|org\.apache\.catalina\.filters\.CsrfPreventionFilter\$LruCache(?:\$1)?|java\.util\.(?:Linked)?HashMap"/>
创建远程管理用户conf/tomcat-users.xml
<roleomca 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="tomcat" password="tomcat" roles="manager-gui,manager-script,manager-jmx,manager-status,admin-gui,admin-script"/>
输入账密记入远程管理,进入之后就可以上传war包