Tag Archive for tomcat

How to get Apache Tomcat version

java -cp </usr/share/tomcat8>/lib/catalina.jar org.apache.catalina.util.ServerInfo

 

apache tomcat multiple instances on gentoo

user $/usr/share/tomcat-7/gentoo/tomcat-instance-manager.bash
No action specified!
Usage: /usr/share/tomcat-7/gentoo/tomcat-instance-manager.bash <--create|--remove|--help> [--suffix s][--user u][--group g]

  Options:
    --help:
      show this text.
    --create:
      create a new instance
    --remove:
      remove an existing instance.
    --suffix SUFFIX:
      a suffix for this instance. the suffix may not collide with an already
      existing instance, defaults to empty.
    --user USER:
      the user for which to configure this instance for. The user needs to
      exist already. defaults to tomcat.
    --group GROUP:
      the group for which to configure this instance for. The group needs to
      exist already. defaults to tomcat.

Examples:

/usr/share/tomcat-7/gentoo/tomcat-instance-manager.bash --create --suffix testing --user tacmot --group tacmot
/usr/share/tomcat-7/gentoo/tomcat-instance-manager.bash --remove --suffix testing

Follow the information in the help to create new Tomcat instances. Tomcat instances use the following layout:

  • /etc/conf.d/tomcat-SLOT-suffix: configuration file for running Tomcat instance services
  • /etc/init.d/tomcat-SLOT-suffix: controlling script for the Tomcat instance
  • /etc/tomcat-SLOT-suffix/: directory containing standard Tomcat configuration files
  • /var/lib/tomcat-SLOT-suffix/: Catalina base directory
  • /var/log/tomcat-SLOT-suffix/: directory for instance log files

Gentoo szerveren Tomcat-ben, alkalmazás specifikus propertie fájl classpath-ra tétele

Először is megnyitjuk a tomcat conf-ot

vi /etc/conf.d/tomcat-7-main

majd itt a

az alábbi sort módosítjuk pl:

JAVA_OPTS="-Dtimetracker_config_location=file:///var/lib/tomcat-7-main/properties/timetracker.properties