Programming/Java(Spring)2019. 6. 7. 16:26

$ sudo apt-get install tomcat9-admin

$ sudo vim /etc/tomcat9/tomcat-users.xml

  <role rolename="manager-gui"/>
  <role rolename="manager-script"/>
  <role rolename="manager-status"/>
  <user username="tomcat" password="password" roles="manager-gui,manager-script,manager-status"/>

 

war 디플로이 경로(tomcat manager 쓰면 상관없음)

/var/lib/tomcat9/webapps

 

 

+

2019.07.29

sudo vi /etc/tomcat9/tomcat-users.xml

sudo vi /usr/share/tomcat9-admin/manager/WEB-INF/web.xml

<multipart-config>
   <max-file-size>152428800</max-file-size>
   <max-request-size>152428800</max-request-size>
   <file-size-threshold>0</file-size-threshold>
</multipart-config>

sudo vim /usr/share/tomcat9-admin/manager/META-INF/context.xml

<Context antiResourceLocking="false" privileged="true" >
<!--
  <Valve className="org.apache.catalina.valves.RemoteAddrValve"
     allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />
-->
  <Manager sessionAttributeValueClassNameFilter="java\.lang\.(?:Boolean|Integer|Long|Number|String)|org\.apache\.catalina\.filters\.CsrfPreventionFilter\$LruCache(?:\$1)?|java\.util\.(?:Linked)?HashMap"/>
</Context>
Posted by 구차니