Difference between revisions of "Setup:Installation Manual/Services and system configuration/Apache Tomcat"

[quality revision][unchecked revision]


This document describes the configuration of the Apache Tomcat server, which is needed for the Webservices of BlueSpice.

Installation[edit | edit source]

Linux[edit | edit source]

Install the latest version of the Apache Tomcat server in the package manager of your distribution. The package manager dissolves all dependencies and installs the required packages.  

Windows[edit | edit source]

Java[edit | edit source]

Apache Tomcat requires the Java Runtime Environment. If these is not already installed at your system, download (www.java.com) and install it. We recommend the 64 bit version for latest systems. 

Tomcat[edit | edit source]

Download the "32-bit/64-bit Windows Service Installer" from the Tomcat project website.  No modifications are necessary during the installation process. Confirm the single steps with "Next".

Installation Check[edit | edit source]

If the Apache Tomcat server has been installed and started correcly can be checked by calling up http://<hostname-oder-ip-des-servers>:8080. With a correct installation, the default page of the server will be displayed. 

Configuration[edit | edit source]

Now, two configuration files of the Tomcat server need to be adjusted: 

  • context.xml
  • server.xml

Those can - per default - be found at: 

  • with Windows: C:\Program Files\Apache Software Foundation\Tomcat 8.5\conf
  • with Linux: /etc/tomcatX (the "X" stands for the particular Tomcat version)

context.xml[edit | edit source]

Replace the line

<context>

with

<Context mapperContextRootRedirectEnabled="true">

server.xml[edit | edit source]

Please make sure that the complete block

<Connector port="8080" protocol="HTTP/1.1"
	... />

is as follows:

<Connector port="8080" protocol="HTTP/1.1"
	connectionTimeout="20000"
	URIEncoding="UTF-8"
	redirectPort="8443"
	address="127.0.0.1" />

Restart Tomcat[edit | edit source]

Restart the Tomcat server:

  • Linux: service tomcatX restart (the "X" stands for the particular Tomcat version)
  • Windows: See below: Restart Tomcat

Besonderheiten unter Windows[edit | edit source]

Configure Tomcat[edit | edit source]

All of the following settings need to be done in the configuration interface of Tomcat. These can be found in the start menue under "Configure Tomcat".

Restart Tomcat[edit | edit source]

The restart can restard can be performed in the first tab of the configuration interface. Stop and then start the service there. 

Setup:Setup tomcat configure tomcat 01.jpg

Setup Autostart[edit | edit source]

Tomcat will not automatically be started with Windows. This needs to be configured in the first tab, where you also start the service. Switch to "Automatic" under "Startup type" and save this changes with a click on "Apply". 

Particular Caution: Java Update[edit | edit source]

Tomcat requires Java. The path for this is firmly defined in Tomcat. Java, however, changes the installation path with every update. Those needs to be configured in Tomcat after every update to guarantee the functionality of Tomcat. 

To do this, switch to the tab "Java" and change the path to jvm.dll under "Java Virtual Machine" - normally this is
C:\Program Files\Java\<Pfad-zur-aktuellen-Java-Installation>\bin\server\jvm.dll.


Setup:Setup tomcat configure tomcat 02.jpg
{{DISPLAYTITLE:Apache Tomcat}}
        
        __TOC__
        

        This document describes the configuration of the Apache Tomcat server, which is needed for the [[Setup:Installation_Manual/Webservices|Webservices]] of BlueSpice.
        

        ==Installation==
        
        ===Linux===
        
        Install the latest version of the Apache Tomcat server in the package manager of your distribution. The package manager dissolves all dependencies and installs the required packages.  
        

        ===Windows===
        
        ====Java====
        
        Apache Tomcat requires the Java Runtime Environment. If these is not already installed at your system, download ([https://www.java.com/de/download/manual.jsp www.java.com]) and install it. We recommend the 64 bit version for latest systems. 
        

        ====Tomcat====
        
        Download the "32-bit/64-bit Windows Service Installer" from the [http://tomcat.apache.org/download-80.cgi Tomcat project website].
        
         No modifications are necessary during the installation process. Confirm the single steps with "Next".
        
<gallery mode="packed">
        
        File:Setup:Setup_tomcat_windows_02.jpg
        
        File:Setup:Setup_tomcat_windows_02.jpg
        
        File:Setup:Setup_tomcat_windows_03.jpg
        
        File:Setup:Setup_tomcat_windows_04.jpg
        
        File:Setup:Setup_tomcat_windows_05.jpg
        
        File:Setup:Setup_tomcat_windows_06.jpg
        
        File:Setup:Setup_tomcat_windows_07.jpg
        
        File:Setup:Setup_tomcat_windows_08.jpg
        </gallery>
        

        ===Installation Check===
        
        If the Apache Tomcat server has been installed and started correcly can be checked by calling up ''http://&lt;hostname-oder-ip-des-servers&gt;:8080''. With a correct installation, the default page of the server will be displayed. 
        

        ==Configuration==
        
        Now, two configuration files of the Tomcat server need to be adjusted: 
        

        * context.xml
        
        * server.xml
        

        Those can - per default - be found at: 
        

        * with Windows: ''C:\Program Files\Apache Software Foundation\Tomcat 8.5\conf''
        
        * with Linux: /''etc/tomcatX'' (the "X" stands for the particular Tomcat version)
        

        ===context.xml===
        
        Replace the line
        

         &lt;context&gt;
        

        with
        

         &lt;Context mapperContextRootRedirectEnabled="true"&gt;
        

        ===server.xml===
        
        Please make sure that the complete block
        
<pre>&lt;Connector port="8080" protocol="HTTP/1.1"
        
        	... /&gt;
        </pre>
        

        is as follows:
        
<pre>&lt;Connector port="8080" protocol="HTTP/1.1"
        
        	connectionTimeout="20000"
        
        	URIEncoding="UTF-8"
        
        	redirectPort="8443"
        
        	address="127.0.0.1" /&gt;
        </pre>
        

        ===Restart Tomcat===
        
        Restart the Tomcat server:
        

        * Linux: ''service tomcatX restart'' (the "X" stands for the particular Tomcat version)
        
        * Windows: See below: [[Setup:Installation_Manual/System_Configuration/Apache_Tomcat#Restart_Tomcat|Restart Tomcat]]
        

        ==Besonderheiten unter Windows==
        
        ===Configure Tomcat===
        
        All of the following settings need to be done in the configuration interface of Tomcat. These can be found in the start menue under "Configure Tomcat".
        

        ===Restart Tomcat===
        
        The restart can restard can be performed in the first tab of the configuration interface. Stop and then start the service there. <br /><br />
        

        [[File:Setup:Setup_tomcat_configure_tomcat_01.jpg|center|200x192px]]
        

        ===Setup Autostart===
        
        Tomcat will not automatically be started with Windows. This needs to be configured in the first tab, where you also start the service. Switch to "Automatic" under "Startup type" and save this changes with a click on "Apply". 
        

        ===Particular Caution: Java Update===
        
        Tomcat requires Java. The path for this is firmly defined in Tomcat. Java, however, changes the installation path with every update. Those needs to be configured in Tomcat after every update to guarantee the functionality of Tomcat. 
        

        To do this, switch to the tab "Java" and change the path to jvm.dll under "Java Virtual Machine" - normally this is<br /><code>C:\Program Files\Java\&lt;Pfad-zur-aktuellen-Java-Installation&gt;\bin\server\jvm.dll</code>.
        

        [[File:Setup:Setup_tomcat_configure_tomcat_02.jpg|center|200x192px]]
Line 78: Line 78:
  
 
===Restart Tomcat===
 
===Restart Tomcat===
The restard can be performed in the first tab of the configuration interface. Stop and then start the service there. <br /><br />
+
The restart can be performed in the first tab of the configuration interface. Stop and then start the service there. <br /><br />
  
 
[[File:Setup:Setup_tomcat_configure_tomcat_01.jpg|center|200x192px]]
 
[[File:Setup:Setup_tomcat_configure_tomcat_01.jpg|center|200x192px]]

Attachments

Discussions