Tomcat

De Banane Atomic
Aller à la navigationAller à la recherche

Dossiers

/etc/tomcat8 conf
/usr/share/java/tomcat8 lib
/var/lib/tomcat8/webapps webapps
/var/log/tomcat8 log (par défaut tout est logué dans le journal)

Déployer des application en dehors de webapps

/etc/tomcat8/Catalina/localhost/MyProject.xml
<Context path="/MyProject" docBase="/path/MyProject" reloadable="true"/>

Installation

Bash.svg
pacman -S tomcat8 tomcat-native
# jre8-openjdk
/etc/tomcat8/tomcat-users.xml
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users xmlns="http://tomcat.apache.org/xml"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
              version="1.0">

  <role rolename="tomcat"/>
  <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="tomcat" password="..." roles="tomcat"/>
  <user username="manager" password="..." roles="manager-gui,manager-script,manager-jmx,manager-status"/>
  <user username="admin" password="..." roles="admin-gui"/>

</tomcat-users>
Bash.svg
systemctl start tomcat8