Uploaded by buttonrus95

Tomcat 8 Installation and Tuning Guide v2.0

advertisement
Apache Tomcat 8 Installation & Tuning Guide for
Teamcenter
White Paper
This will outline the best practices, installation, and
configuration for Apache Tomcat 8 in a Teamcenter
environment.
The purpose of this document is to provide guidance on the
installation of Java Development Kit (JDK) and Apache
Tomcat Application Server on Windows and Linux/Unix
platforms. As of Teamcenter 11.2, dependencies on
Enterprise Java Beans (EJB), CORBA and the IIOP protocol
have been removed from the implementation of the
Teamcenter web tier. As a result, Teamcenter now supports
Apache Tomcat (in single or clustered mode) as a web
application server.
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
Software Copyright and Trademark Notices
© 2018 Siemens Product Lifecycle Management Software Inc. No part of this document
may be copied, reprinted, or distributed without the written permission of Siemens Product
Lifecycle Management Software Inc. (“Siemens PLM Software”), except that entities with
a Teamcenter® Maintenance Agreement in force may reproduce this document for their
internal use only.
Siemens is a registered trademark of Siemens AG. The Siemens logo is a registered trademark
of Siemens AG. Teamcenter® is a trademark or registered trademark of Siemens Product
Lifecycle Management Software Inc. or its subsidiaries in the United States and in other
countries. Siemens PLM Software Teamcenter® and Transforming the process of innovation are
trademarks or registered trademarks of Siemens PLM Software or its subsidiaries in the US and
in other countries. Adobe and Acrobat are either registered trademarks or trademarks of Adobe
Systems Incorporated in the United States and/or other countries. All other trademarks or
registered trademarks belong to their respective holders.
This software and related documentation are proprietary to Siemens PLM Software.
Note:
The pages of this document are numbered consecutively 1…N without the usual
Roman numeral numbering of the front matter. This makes the document’s page
numbers consistent with the numbers displayed by the Adobe® Acrobat® viewer and
simplifies printing of page ranges from Acrobat.
For Teamcenter® Customer Support, contact the Siemens PLMS Global Technical Access
Center at
(800) 955-0000 or http://support.ugs.com.
Printed in the United States of America. 7/13/18
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
2
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
Disclaimer
This document is intended to provide helpful hints for tuning and configuring Apache Tomcat
for the Teamcenter® environment. Siemens PLM Software is providing this information as is,
without warranty of any kind. SIEMENS PLM SOFTWARE hereby disclaims and assumes
no responsibility or liability for any results that occur due to the use of the information
contained in this document.
Siemens PLM Software Product Development and GTAC organizations are not responsible for
providing direct support of Tomcat.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
3
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
DOCUMENT HISTORY
Version
Date
Author
Description
1.0
11/18/2016
N. Saxton
Initial release
2.0
6/6/2018
T Goerdt
Revision and Edits
CONTRIBUTORS
S. Schweyher
G. Herran
I. Pack
T Goerdt
Principal Infrastructure Architect
REVIEWERS
J. Meacham
T Goerdt
Principal Infrastructure Architect
Paul Kessler
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
4
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
5
Table of Contents
1
INTRODUCTION
7
2
TEAMCENTER ARCHITECTURE
10
3
TOMCAT 8 INSTALLATION AND TUNING FOR WINDOWS
11
3.1 JDK INSTALLATION FOR WINDOWS
3.2 TOMCAT INSTALLATION FOR WINDOWS
3.2.1 TEST TOMCAT OPERATIONAL STATUS FOR WINDOWS
3.3 TOMCAT CONFIGURATION FOR WINDOWS
3.3.1 ACCESSING THE TOMCAT CONFIGURATION UTILITY
3.3.1.1 Manual Start/Stop of Tomcat
3.3.1.2 Tune JAVA Memory
3.3.1.3 Tune JAVA Garbage Collection
3.3.1.4 Tune Java to Enable Large Page Support
3.3.2 MODIFY TOMCAT CONFIGURATION FILES
3.3.2.1 Modify Server.xml File
3.3.2.2 Modify Context.xml File
3.3.2.3 Modify Web.xml File to Implement Production Setting
3.3.3 OVERRIDE TOMCAT DEFAULT HOME PAGE
3.3.4 DELAY TOMCAT START ON POOL SERVER
3.3.5 SSL SUPPORT
3.3.6 TOMCAT PERFORMANCE LIBRARY
11
12
15
15
16
16
17
19
20
25
25
26
27
28
29
29
29
4
33
TOMCAT 8 INSTALLATION AND TUNING FOR LINUX/UNIX
4.1 JDK INSTALLATION FOR LINUX/UNIX
4.2 TOMCAT INSTALLATION FOR LINUX/UNIX
4.3 TOMCAT CONFIGURATION FOR LINUX/UNIX
4.3.1 MODIFY TOMCAT CONFIGURATION FILES
4.3.1.1 Modify Context.xml File
4.3.1.2 Modify Server.xml File
4.3.1.3 Modify Web.xml
4.3.2 TOMCAT JVM TUNING
4.3.2.1 Tune Java Memory
4.3.2.2 Tune Java Garbage Collection
4.3.3 OVERRIDE TOMCAT DEFAULT HOME PAGE
4.3.4 ADDITIONAL LINUX/UNIX REFERENCES FOR TOMCAT TUNING
4.3.4.1 Tomcat Running as a Service for Linux:
4.3.4.2 Tomcat Native Library for Linux items:
4.3.4.3 Tomcat SSL for Linux:
4.3.4.4 Tomcat using HugePages for Linux:
33
34
36
36
37
37
38
39
39
39
41
42
42
42
42
42
5
43
SUMMARY
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
6
REFERENCES
Appendix A
Appendix B
Installations
Appendix C
Installations
6
44
Apache Tomcat Installation & Tuning Checklists for Windows and Linux/Unix
A-1
Override Tomcat Default Home Page for Teamcenter Systems Engineering (TcSE)
B-5
Delay Tomcat Start on Database Server for Teamcenter for Systems Engineering (TcSE)
C-6
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
1 Introduction
The purpose of this document is to provide guidance on the installation of Java Development Kit
(JDK) and Apache Tomcat Application Server on Windows and Linux/Unix platforms. As of
Teamcenter®11.2, dependencies on Enterprise Java Beans (EJB), CORBA and the IIOP protocol
have been removed from the implementation of the Teamcenter web tier. As a result,
Teamcenter now supports Apache Tomcat (in single or clustered mode) as a web application
server.
Siemens recommends downloading the 64-bit versions of software when possible, based on your
system configuration and requirements.
It is recommended to deploy the latest certified version of Tomcat (this guide uses 8.0.17 since it
was the first certified version) on a Server class system with a server class Operating System
such as 64-bit Windows 2008 Server R2 SP1, 64-bit Windows 2012 Server R2, Red Hat Linux
Enterprise Server x64 SP2 (RHEL 6.4+ and 7.x Server) or SUSE Linux Enterprise Server x64 11
SP2, SP3, and SP4. The minimum supported version for Teamcenter 11.2 is Tomcat 7.0.59.
For a high level check list of Apache Tomcat Installation and Tuning steps, refer to Appendix A
Apache Tomcat Installation & Tuning Checklists for Windows and Linux/Unix
Tomcat Installation &Tuning Checklist for Windows
JDK Installation
Install a supported version of JDK (1.7.0_80 or higher)
Download from:
http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloadsjavase7-521261.html
Tomcat Installation
Download Tomcat 8.0.1.7 from:
http://archive.apache.org/dist/tomcat/tomcat-8/v8.0.17/bin/
Start Tomcat
Test Tomcat operational status from http://localhost:8080
Stop Tomcat
Tomcat Tuning and Configuration
Tune Java Memory
Low to Medium Loads: Initial/Max memory = 2048
High Loads:
Initial/Max memory = 4096
Tune Java Garbage Collection
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
7
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
Tomcat Installation &Tuning Checklist for Windows
Add parameters to Java Options:
-XX:+UseParallelGC
-XX:+UseParallelOldGC
-XX:+AlwaysPreTouch
-XX:NewRatio=1
-XX:SurvivorRatio=6
-XX:+DisableExplicitGC
-Xverify:none
Tune Java to Enable Large Page Support
Add parameters to Java Options:
-XX:+UseLargePages
-XX:LargePageSizeInBytes=4m
Enable Large Page Support via Local Security Policy
Backup and Modify server.xml file to enhance performance and remove 2MB limit for
document import
o Set socketBuffer = "32768" (default size is 9000)
o Set maxPostSize="-1"
o Set SavePostSize="-1"
Backup and Modify context.xml file to deploy Teamcenter Security Services (TcSS) on the
same Tomcat app server as Teamcenter
o Set useHttpOnly="false"
Backup and Modify Web.xml file to implement Production Setting
o Set development parameter to false
o Set reloading parameter to false
Override default Tomcat home page
Delay Tomcat start on Pool Server
Set Up SSL Support
Install Native Library
Download from:
http://tomcat.apache.org/download-native.cgi
.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
8
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
9
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
2 Teamcenter Architecture
Teamcenter functions in either a 2-tier or 4-tier deployment. In the 4-tier deployment, there are
two technology options for the Web App Tier, one using a Java based solution or one based on
Microsoft .Net. For the Java based solution, Tomcat is one of the supported Java options. In a 4tier deployment, the four tiers are the Client, Web Server, Enterprise and the Resource tiers. The
protocol in use between the Client and Web App Tiers is either HTTP or HTTPs. Multiple Web
APP instances can be configured to provide scalability and fail-over capabilities.
Figure 1 Four-Tier Architecture
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
10
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
11
3 Tomcat 8 Installation and Tuning for Windows
3.1 JDK Installation for Windows
The Apache Tomcat application is compatible with 64-bit JDK installations. If you are loading
software on a 64-bit system, please download the 64-bit version of the JDK. Additionally,
ensure you are utilizing a JDK version that is compatible with your current Tomcat and
Teamcenter version (see Teamcenter certification platform matrix).
This section outlines how to perform a standard installation of 64-bit JDK 1.7.0_80. Newer
versions of JDK may be available for download and installation including Java 1.8.0_xxx.
Check the Teamcenter Platform Support Matrix for the latest supported/certified version. Note:
For Java customizations to SOA only Oracle JDK certified except for AIX platforms where JDK
is provided by IBM.
1. Remove previous version of Java. Make sure that the software is not in use before starting
the removal process. This includes any scheduled tasks and/or other applications that are
using Java.
2. Select JDK 1.7.0_80 (Java SE Development Kit 7u80) from the following link:
http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html
1
3. Accept the license agreement and download the software. NOTE: you may need to enter your
Oracle account information or create an Oracle Account to get access to the download.
4. Save the Windows x64 JDK executable file to a file location of your choice.
5. Select the saved “jdk-7u80-windows-x64.exe” executable file, right-click and Run as
Administrator.
6. Click Next in Installation Wizard Setup screen.
7. Accept the default features for the Java(TM) SE Development kit Custom Setup and the
default installation path: C:\Program Files\Java\jdk1.7.0_80 by selecting Next.
For Windows servers the “Source Code” and “Public JRE” options are not required.
8. A window displays showing the progress of the installation and automatically closes upon
completion.
9. If “Public JRE” was not deselected then accept the default installation path C:\Program
Files\Java\jre7\ (64 bit location) by selecting Next.
10. A window displays showing the progress of the installation and automatically closes upon
completion.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
11. The notification window shows that the JDK 7 Update 80 installation is complete. Select
Close, to close the window.
12. Turn off auto Java update. Open the Java Control Panel by selecting Start > Control Panel
> Java. In the Java Control Panel dialog select the Advanced tab. Scroll down to the “JRE
Auto-Download” option and select “Never Auto-Download” and then press the “Apply”
button. This mitigates the risk of updating Java by mistake. Press the “OK” button to close
the Java Control Panel.
3.2 Tomcat Installation for Windows
This section illustrates how to install the Tomcat 8 application server version 8.0.17.
Siemens recommends installing Tomcat, Teamcenter and all Teamcenter support software from a
service account and not a common user account. User accounts are often locked and/or removed
when the user separates from employment or transfers to another department or function. A
permanent service account is recommended. This service account will require administration
rights on servers where Teamcenter and Teamcenter support software is installed and if possible
have non-expiring passwords.
Siemens recommends installing the “64-bit Windows Service Installer” package. This package
installs Tomcat 8 and makes all the registry changes that allow Tomcat to run either as a
Windows Service (if set to automatic) or On Demand (if set to manual).
Documentation for Tomcat 8 is located at: http://tomcat.apache.org/tomcat-8.0-doc/index.html 2
Tomcat 8 can be downloaded from: http://archive.apache.org/dist/tomcat/tomcat-8/v8.0.17/bin/ 3
1. On the Apache Tomcat page click on the “apache-tomcat-8.0.17.exe” link located in the
Archive bin directory and “save” to a directory location of your choice. This is the 32bit/64-bit Windows installer for Tomcat intended for users planning to launch Tomcat
through the Windows shortcuts or services.
2. Select the saved “apache-tomcat-8.0.17.exe” file, right-click and select “Run as
Administrator”.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
12
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
3. Click Next in Installation Wizard Setup screen.
4. Click I Agree in the License Agreement window to continue with the install.
5. The Apache Tomcat Setup window allows you to select which components you want to
install. Please review each of the options below. Set the features accordingly and then
press Next to continue.
a) Option 1: For a Normal installation, accept the default list of selected items.
b) Option 2: For a non-Test server you may want to skip installing documentation by
un-checking the Documentation item. You may also want to un-check the Manager
unless you plan to use the tomcat deployment manager.
c) Option 3: For a Siemens recommended installation, expand the Tomcat item and
select “Service Startup” and “Native”, along with the already selected “Core”.
Unless you need the Manager function then it’s recommended to un-select Manager.
NOTE: If you want the Manager function then leave it selected and be sure to
change the userid (Do NOT accept the default userid) and set a strong password when
requested later in the install process (not shown in this document).
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
13
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
6. Once the Apache Tomcat features have been set a Configuration Options window is
displayed with fields to override the Port numbers and Windows Service Name. The
default values for Ports and Service Name are normally acceptable.
The port numbers would need to be changed if 1) multiple instances of Tomcat are
installed, 2) a load balancer is being used, or 3) If one or more of the default ports are in
use or required to be used by other software running on the server.
Multiple instances of Tomcat on the same system would require a different Service Name
for each instance for example Tomcat7a and Tomcat7b (Note: do not include spaces in
the Service name).
Accept or update the port values as described above. In this document the default values
are used. Click Next to continue.
7. Since Java was already installed, the Tomcat installer will show the path to the JRE that
was installed as part of the JDK installation. (If the correct pathname is not shown then
use the “…” button to select the correct pathname.) Click Next.
8. In the Install Location window you are given the option to change where the Tomcat
software will be installed. Normally the default location is acceptable. The destination
folder may need to be updated if multiple instances are installed or if you have a
requirement to install application software in a specific location. Click Install to
continue.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
14
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
9. Once the installation is complete the Apache Tomcat Setup window will be displayed.
At this time you have the option to start Tomcat by leaving “Run Apache Tomcat”
checked. If you are not ready to start Tomcat leave that option unchecked. One reason to
start tomcat at this time is to make sure it starts before additional changes are made.
Reasons for not starting tomcat at this time include:
 Complete Tomcat configuration first (This will be discussed later)
 Deploy the Tc war file (normally tc.war) during initial startup
Once you have selected the desired options click Finish.
3.2.1 Test Tomcat Operational Status for Windows
Start Tomcat. Once tomcat is started the default web application will be available. Verify that
the Tomcat service is running by opening a web browser and entering the following URL:
http://localhost:8080/
Note: 8080 is the default port used during Tomcat installation. If the port was changed during
the install replace 8080 with the port selected during the install.
The Apache Tomcat splash screen is displayed.
For Windows:
3.3 Tomcat Configuration for Windows
Tomcat for Windows can be tuned by modifying values within the Tomcat configuration utility
and by making changes to several of the Tomcat configuration files. This section discusses
changes that support Tomcat for use as an application server and web server for Teamcenter.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
15
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
3.3.1 Accessing the Tomcat Configuration Utility
Tomcat shipped with a configuration utility named “tomcat7w”. To correctly run this utility, use
the "Run as administrator" option. This utility can be accessed several ways:
a) Via the Tomcat 8 bin directory:
C:\Program Files\Apache Software Foundation\Tomcat 8.0\bin
b) Via Start > All Programs > Apache Tomcat 8.0 {Service name} > Configure Tomcat
The Tomcat configuration utility will start and display the opening screen.
3.3.1.1 Manual Start/Stop of Tomcat
The properties displayed for the startup type define what will happen on system start. When set
to Manual the Tomcat Service will require manual starting, while if set to Automatic the Tomcat
Service will automatically start when the server boots.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
16
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
The Tomcat service can be stopped and started via this Tomcat Configuration utility. The
Windows Services utility may also be used to start or stop Tomcat and can be accessed via Start
> Run > services.msc.
3.3.1.2 Tune JAVA Memory
The following configuration items are displayed in the “Java” tab of the Tomcat Configuration
utility.
To improve Tomcat performance and user capacity within the Tomcat instance, set the Initial
and Maximum memory pool values based on available memory for the server. The Initial
memory pool (Xms) and Maximum memory pool (Xmx) values should be the same number.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
17
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
For expected Low to Medium load conditions the initial/maximum memory should be set to
at least 2048, but this value may need to be adjusted up or down based on actual usage. For
example:
For expected High load conditions the initial/maximum memory should be set to at least 4096,
but this value may need to be adjusted up or down based on actual usage. For example:
For Teamcenter the Thread stack size (Xss) value should be blank (not set).
Each of the parameters is defined below:
Initial memory pool (Xms)
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
18
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
Specify the initial size, in bytes, of the memory allocation pool. This value
should be a multiple of 1024 greater than 1MB.
Maximum memory pool (Xmx)
Specify the maximum size, in bytes, of the memory allocation pool. This value
should be a multiple of 1024 greater than 2MB.
REMEMBER: For Teamcenter usage the initial and maximum memory values should be the
same.
3.3.1.3 Tune JAVA Garbage Collection
Tune Java to improve Garbage Collection (GC) cycles and performance by adding the “-XX”
and “-X” items below within the Java Options section. Note: this is an optional change, but if it
is not made performance may not be as good as it could be.
Add the following options to the Java Options section within the Configure Tomcat utility
-XX:+UseParallelGC
-XX:+UseParallelOldGC
-XX:+AlwaysPreTouch
-XX:NewRatio=1
-XX:SurvivorRatio=6
-XX:+DisableExplicitGC
-Xverify:none
Make sure that there are NO spaces at the end of the options added. If a space is entered then
Tomcat will not start. The stderr log file will list an error for the java option. For example if
there is a space after “-XX:+DisableExplicitGC“ then the log would contain the following entry:
Commons Daemon procrun stderr initialized Unrecognized VM option
'+DisableExplicitGC '
Notice there is a space after the “C” and before the single quote mark that ends the second line.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
19
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
3.3.1.4 Tune Java to Enable Large Page Support
The Large Pages option is only supported on 64-bit systems. To enable large page support, add
the following two “-XX” items to the Java Options section. Note: this is an optional change, but
if it is not made performance may not be as good as it could be.
-XX:+UseLargePages
-XX:LargePageSizeInBytes=4m
Large page support is not enabled by default on Windows Server 2012. To enable large page
support in this environment perform the following actions.
1. Navigate to the Local Security Policy be selecting the following Menus:
Start > Control Panel > Administrative Tools > Local Security Policy (Run as
Administrator)
2. Expand Local Policy within the list and select User Rights Assignment
3. In the Policy list on the right, scroll down and select Lock Pages in Memory, right-click
and select Properties
4. Add the user that Tomcat will be running as (for example: tcradm) and the Group that the
account belongs to by pressing Add User or Group
5. Once assigned, reboot the machine for the policy to take effect
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
20
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
The following are the step by step screenshots for the actions listed above:
Step 1: Navigate to the Local Security Policy be selecting the following Menus: Start >
Control Panel >Administrative Tools > Local Security Policy (Run as Administrator)
Step 2: Expand Local Policies and then select User Rights Assignment
Step 3: In the Policy list on the right, scroll down and select Lock Pages in Memory, right-click
and select Properties
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
21
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
Step 4: Add the user that Tomcat will be running as (for example: tcradm) and the Group that
the account belongs to.
a) In the Lock pages in memory Properties window press Add User or Group…
b) IF you have the required permissions you can add the user account in The Select Users,
Computes, Service Accounts, or Groups window by:
 Entering the user account name
 Select Object Types… button
 Add the Group option
 Add the Administrators group
 Press OK
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
22
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
If you do NOT have permissions then try the following in the Select Users or Groups
window:
 Select Locations
 Click Cancel on next pop-up and then highlight the server name of the local
system that tomcat is being installed on and click OK
 Select Object Types… and add a check mark before Group and click OK
 Add Administrators as an object name and click Check Name. Then click OK
which should then display a screen like the following (NOTE: ”net.plm.eds.com”
(as shown in previous screenshot) and “PLI6S200” would be replaced with your
domain and server name)
c) In the Lock pages in memory properties window press Apply followed by OK.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
23
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
You should now see Administrators listed under Security settings for the Lock Pages in
Memory Policy.
Step 5: Once assigned, reboot the machine for the policy to take effect.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
24
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
3.3.2 Modify Tomcat Configuration Files
Tomcat can be tuned by modifying or adding parameters in three configuration files: server.xml,
web.xml, and context.xml. These files are found in the conf directory under the installation path
for Tomcat. In the example used in this document this is located:
C:\Program Files\Apache Software Foundation\Tomcat 8.0\conf
3.3.2.1 Modify Server.xml File
Making specific changes to the server.xml file allows users to enhance performance as well as to
remove the 2MB limitation for document import. In order to implement these changes, the
maxPostSize, maxSavePostSize, and socketBuffer settings must be added to the server.xml file.
To enhance performance, add the following parameter within the server.xml file:
socketBuffer="32768" (default size is 9000)
To disable the default 2MB size limit for the size of a document that can be imported into
Teamcenter, eliminate the default setting of 2MB limit by setting the following parameter within
the server.xml file.
maxPostSize="-1"
maxSavePostSize=”-1”
To make the above recommended changes, open the server.xml file using an ascii text editor or
XML editor (for example: Notepad or Notepad++) and add/modify the connector port settings as
indicated below:
From:
Define a non-SSL HTTP/1.1 Connector on port 8080
-->
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
To:
Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
-->
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"
maxPostSize="-1"
maxSavePostSize="-1"
socketBuffer="32768" />
Save and close the server.xml file. Stop and start Tomcat after making these changes.
Note: the port numbers would be different on the 2nd instance of Tomcat.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
25
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
3.3.2.2 Modify Context.xml File
If you plan to deploy Teamcenter Security Services (TcSS) on the same Tomcat application
server instance as Teamcenter, ensure that the Tomcat 8 HTTP-only flag is disabled. The default
setting is enabled. If TcSS will not be deployed on the same Tomcat server with Teamcenter,
then no action is required.
Tomcat uses the common attribute useHttpOnly to represent the HTTP-only
flag. Though it is not explicitly set, Tomcat assumes HTTP-only as enabled, unless
useHttpOnly is explicitly set to false. To ensure proper functioning of the Security Services,
insert useHttpOnly="false" after the Context keyword in the context.xml file.
Following is an example of the global context element before and after the update to ensure
that the HTTP-only flag is disabled:
From:
<Context>
the
<!-- Default set of monitored resources. If one of these changes,
-->
<!-- web application will be reloaded.
-->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
To:
<Context>
the
<!-- Default set of monitored resources. If one of these changes,
-->
<!-- web application will be reloaded.
-->
<!-- Context element with HTTP-only explicitly disabled -->
useHttpOnly="false"
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
26
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
3.3.2.3 Modify Web.xml File to Implement Production Setting
By default, Tomcat is configured to automatically search for new WAR files (in \webapps
directory) and new JSPs on a consistent basis. It does this search so that new items found will
automatically be deployed. In a production environment, this may not be the desired state.
Constantly checking for files consumes CPU cycles that can be better utilized supporting other
functions within the production environment. To change the default setting the parameters that
follow, must be added to the web.xml file.
<init-param>
<param-name>development</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>reloading</param-name>
<param-value>false</param-value>
</init-param>
Open the web.xml file using text or xml editor. Add the above parameters into the section
indicated below in bolded letters.
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servletclass>
<init-param>
<param-name>fork</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>xpoweredBy</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>development</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>reloading</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
Save and close the web.xml file. Stop and start Tomcat after making the changes to the Tomcat
web.xml file
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
27
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
3.3.3 Override Tomcat Default Home Page
If the user forgets to specify “/awc” (or /tc/webclient) at the end of the URL for accessing the
Teamcenter Active Workspace application (or webclient), then the default Tomcat Home
(Administration) page will be displayed. To override this behavior and have Tomcat default to
the standard Teamcenter Active Worskpace login (or webclient login) page, do the following:
1) Navigate into the directory where Tomcat is installed, for example:
For Windows:
“C:\Program Files\Apache Software Foundation\Tomcat 8.0”
2) Open the” webapps” directory within the Tomcat directory
3) Place a copy of the Teamcenter Active Workspace war file (for example: awc.war or tc.war)
in this directory. Deploy the war file by starting Tomcat (this action will create the “awc” or
“tc” directory within webapps). Once the war file is deployed stop Tomcat.
4) Change into the “ROOT” directory (“webapps\ROOT”)
5) If a file named “index.html” already exist then rename that file to “index-orig.htm”. Create a
file called “index.html” within the ROOT directory that contains the following four (4) lines:
For an Active Workspace client:
<html>
<head><meta http-equiv="refresh" content="0;URL=/awc/">
</head><body></body>
</html>
For a webclient:
<html>
<head><meta http-equiv="refresh" content="0;URL=/tc/webclient/">
</head><body></body>
</html>
6) Now when Tomcat is running and the user specifies the URL (for ex: http://Server.domain or
http://server.domain:port) without the “/awc” or “/tc” then Tomcat will redirect the request to
the Teamcenter Active Workspace login screen or webclient login screen as if the user had
specified the URL with “/awc” or “/tc” specified.
For example for an Active Workspace client:
http://Server.domain/awc or http://server.domain:8080/awc
For a webclient:
http://Server.domain/tc/webclient or http://server.domain:8080/tc/webclient
The original Tomcat Home (Admin) page is available as: http://server.domain /index.jsp or
http://server.domain:port/index.jsp or http://server.domain:port/index-orig.htm (if indexorig.htm exist).
NOTE: For Teamcenter for Systems Engineering (TcSE) installations see Appendix B
Override Tomcat Default Home Page for Teamcenter Systems Engineering (TcSE)
Installations.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
28
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
3.3.4 Delay Tomcat Start on Pool Server
If the pool manager service is installed on the same Windows system as the Tomcat service, then
you want to use Automatic (Delayed Start) for the Tomcat service to allow time for the pool
manager and tcservers to start before the Tomcat service starts. This requires a change to the
Apache Tomcat service configuration via the Windows Services application. When Tomcat is
installed the default is set to automatic (or manual).
To set Windows based Tomcat to use Automatic (Delayed Start) do the following:
1.
2.
3.
4.
Run Start > Control Panel > Administrative Tools > Services
Right-click the Apache Tomcat 8.0 service and select Properties
In the General tab set the Startup Type to Automatic (Delayed Start)
Click OK
NOTE: For Teamcenter for Systems Engineering (TcSE) installations see Appendix C Delay
Tomcat Start on Database Server for Teamcenter for Systems Engineering (TcSE)
Installations.
3.3.5 SSL support
Helpful resources on setting up SSL support until additional information is added to this
document include:

http://tomcat.apache.org/tomcat-8.0-doc/ssl-howto.html 4

http://java-notes.com/index.php/two-way-ssl-on-tomcat 5
3.3.6 Tomcat Performance Library
If “Native” was not selected during the install of Tomcat then you may want to install the
Apache Tomcat Native Library to provide optimal performance in a production environment. (If
you are going to use the native library in production then also use it in at least your QA (preproduction environment as well as production). Siemens PLM Software recommends the use of
Tomcat 8.0 with Apache Tomcat Native Library version 1.2.8 or greater. Check for new
versions of the Native Library periodically on the Apache website.
If native library is not installed then the catalina log will contain an entry like:
INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR
based Apache Tomcat Native library which allows optimal performance in production
environments was not found on the java.library.path: [path information removed]
The default Tomcat installation does not install the Apache Tomcat Native Library. This is one
of the reasons for not using the default install and instead using a custom install which was done
when you expanded the Tomcat item and then selected Native along with Service Startup.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
29
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
1. If default was used during tomcat install, then the Tomcat Native Library can be
downloaded from the following link:
http://tomcat.apache.org/download-native.cgi 7
2. Press the HERE link.
3. Select the *win32-bin.zip file for download and save the file in a temporary location.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
30
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
NOTE: the 64-bit (x64) items are included in the Win32 release files.
4. Once the download is complete, use the Windows File Explorer to access the file and
extract the contents into a new folder directory such as "tomcat-native-1.2.8-win32-bin".
5. Open the extracted directory and navigate to the 64-bit version of the tcnative.dll file
located: \tomcat-native-1.2.8-win32-bin\bin\x64
6. Copy and save the 64-bit version of the tcnative-1.dll file into the Tomcat bin directory;
for example: C:\Program Files\Apache Software Foundation\Tomcat 8.0\bin
Once the tcnative-1.dll file has been copied to the Tomcat 8 bin directory, start the tomcat
service and now the catalina log file should contain an entry showing that the native Library has
been loaded:
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
31
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
If you installed the wrong version of the tcnative-1.dll file then after starting tomcat the catalane
log file will contain an entry flagging the fact that the native library was not loaded, for example:
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
32
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
33
4 Tomcat 8 Installation and Tuning for Linux/Unix
4.1 JDK Installation for Linux/Unix
The Apache Tomcat application is compatible with 64-bit JDK installations. If you are loading
software on a 64-bit system, please download the 64-bit version of the JDK. Additionally,
ensure you are utilizing a JDK version that is compatible with your current Tomcat and
Teamcenter version (see Teamcenter certification platform matrix).
This section outlines how to perform a standard installation of 64-bit JDK 1.7.0_80. Newer
versions of JDK may be available for download and installation including Java 1.8.0_xxx.
Check the Teamcenter Platform Support Matrix for the latest supported/certified version. Note:
For Java customizations to SOA only Oracle JDK certified except for AIX platforms where JDK
is provided by IBM.
1. Select jdk-7u80-linux-x64.tar.gz or jdk-7u80-linux-x64.rpm (Java SE Development Kit
7u80) from the following link:
http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html
1
2. Accept the license agreement and download the software. NOTE: you may need to enter
your Oracle account information or create an Oracle Account to get access to the download.
3. Save the 64-bit JDK executable file to a file location of your choice.
For Example:
/tmp/java
4. Become root by running su and entering the super-user password.
5. Navigate to the directory where you want to install. Type:
cd <directory path name>
NOTE: you may need to create the directory if it does not exist.
For example, to install the software in the /usr/java/ directory, Type:
cd /usr/java
6. Uninstall any earlier installations of the Java packages.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
rpm -e <package_name>
7. Install the package.
rpm -ivh <pathname_to_package>/jdk-7u80-linux-x64.rpm
8. Verify that the software is installed by executing java -version.
9. Delete the .rpm file if you want to save disk space.
10. Exit the root shell.
4.2 Tomcat Installation for Linux/Unix
This section illustrates how to install and configure the Tomcat 8 application server version
8.0.17. This was the first certified version of Tomcat 8 for Teamcenter 11.2. Refer to the
platform matrix for the latest certified version of Tomcat if you want to use a newer version.
Documentation for Tomcat 8 is located at: http://tomcat.apache.org/tomcat-8.0-doc/index.html 2
Tomcat 8 can be downloaded from: http://archive.apache.org/dist/tomcat/tomcat-8/v8.0.17/bin/ 3
Tomcat install documentation is located at: http://tomcat.apache.org/tomcat-8.0-doc/setup.html
and http://tomcat.apache.org/tomcat-8.0-doc/RUNNING.txt
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
34
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
1. On the Apache Tomcat download page click on the “apache-tomcat-8.0.17.tar.gz” link
located in the Archive bin directory and “save” to a directory location of your choice.
For example: /tmp/tomcat
2. Change into the parent directory where you want to install Tomcat.
For example: cd /opt
3. Uncompress the installation
tar zxpf <pathname_to_zipped_tar>/apache-tomcat-x.x.x.tar.gz
The value x.x.x is the product version number of the product release.
4. Create link "/opt/tomcat" that points to the tomcat release
ln -s /opt/apache-tomcat-8.0.17 /opt/tomcat
5. Add the following to the end of the file .bashrc
export JAVA_HOME=/usr/java/latest
export CATALINA_HOME=/opt/tomcat
6. Start the Tomcat: /opt/tomcat/bin/startup.sh
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
35
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
7. Open Firefox to see if the installation is successful by entering the url:
http://localhost:8080
8. Copy the tc.war (awc.war) into the /opt/tomcat/webapps directory
9. Stop tomcat so the tomcat configuration files can be modified to better support
Teamcenter usage.
4.3 Tomcat Configuration for Linux/Unix
4.3.1 Modify Tomcat Configuration Files
Tomcat can be tuned by modifying or adding parameters in three configuration files:
server.xml, web.xml, and context.xml. These files are found in the conf directory under the
installation path for Tomcat. In the Linux/Unix example used in this document this is
located: /opt/tomcat/conf
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
36
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
4.3.1.1 Modify Context.xml File
Make the following changes to $TOMCAT_HOME/conf/context.xml file. Within the Context
section add the following:
From:
To:
4.3.1.2 Modify Server.xml File
Make the following changes to $TOMCAT_HOME/conf/server.xml file. Within the Connector
section add the following:
From:
To:
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
37
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
4.3.1.3 Modify Web.xml
By default, Tomcat is configured to automatically search for new WAR files (in the /webapps
directory) and new JSPs on a consistent basis. It does this search so that new items found will
automatically be deployed. In a production environment, this may not be the desired state.
Constantly checking for files consumes CPU cycles that can be better utilized supporting other
functions within the production environment. To change the default setting the parameters that
follow, must be added to the web.xml file. The file is located:
$TOMCAT_HOME/conf/web.xml file. Within the servlet section of the web.xml file add:
<init-param>
<param-name>development</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>reloading</param-name>
<param-value>false</param-value>
</init-param>
From:
To:
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
38
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
4.3.2 Tomcat JVM Tuning
4.3.2.1 Tune Java Memory
Increase the memory allocated for Tomcat by adding the following “-Xms4g -Xmx4g” items to
the “CATALINA_OPTS” variable definition within the $Tomcat_Home/bin/setenv.sh
configuration file (see sample file updated below).
Note: For a development environment you may use 1g instead of 4g and TEST/QA could get by
with 2g instead of 4g.
4.3.2.2 Tune Java Garbage Collection
Tune the Tomcat JVM to improve Garbage Collection (GC) cycles and performance by adding
the following “-XX” and “-X” items to the “CATALINA_OPTS” variable definition within the
$Tomcat_Home/bin/setenv.sh configuration file (see sample file updated below). Note: this is an
optional change, but if it is not made performance may not be as good as it could be.
-XX:+UseParallelGC
-XX:+UseParallelOldGC
-XX:+AlwaysPreTouch
-XX:NewRatio=1
-XX:SurvivorRatio=6
-XX:+DisableExplicitGC
-Xverify:none
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
39
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
Create or update the file $TOMCAT_HOME/bin/setenv.sh
#!/bin/sh
# $TOMCAT_HOME/bin/setenv.sh OR $CATALINA_BASE/bin/setenv.sh
#
# Define environment items that Tomcat will need (see catalina.sh for addition items)
#
# CATALINA_OUT (Optional) Full path to a file where stdout and stderr
#
will be redirected.
#
Default is $CATALINA_BASE/logs/catalina.out
#
# CATALINA_OUT=""
#
# CATALINA_OPTS (Optional) Java runtime options used when the "start",
#
"run" or "debug" command is executed.
#
Include here and not in JAVA_OPTS all options, that should
#
only be used by Tomcat itself, not by the stop process,
#
the version command etc.
#
Examples are heap size, GC logging, JMX ports etc.
# Items defined below are recommendations for improved Tomcat performance
#
CATALINA_OPTS="-Xms4g -Xmx4g -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:+AlwaysPreTouch
-XX:NewRatio=1 -XX:SurvivorRatio=6 -XX:+DisableExplicitGC -Xverify:none"
# -XX:+UseLargePages -XX:LargePageSizeInBytes=2m <- requires OS to be configured to use Huge pages
# https://jose-manuel.me/2012/11/how-to-enable-the-jvm-option-uselargepages-in-redhat/
# http://www.oracle.com/technetwork/java/javase/tech/largememory-jsp-137182.html
# https://oracle-base.com/articles/linux/configuring-huge-pages-for-oracle-on-linux-64
#
# CATALINA_TMPDIR (Optional) Directory path location of temporary directory
#
the JVM should use (java.io.tmpdir). Defaults to
#
$CATALINA_BASE/temp.
#
# CATALINA_TMPDIR=""
#
# JAVA_HOME
Must point at your Java Development Kit installation.
#
Required to run the with the "debug" argument.
#
# JAVA_HOME=""
#
# JRE_HOME
Must point at your Java Runtime installation.
#
Defaults to JAVA_HOME if empty. If JRE_HOME and JAVA_HOME
#
are both set, JRE_HOME is used.
#
# JRE_HOME=""
#
# JAVA_OPTS
(Optional) Java runtime options used when any command
#
is executed.
#
Include here and not in CATALINA_OPTS all options, that
#
should be used by Tomcat and also by the stop process,
#
the version command etc.
#
Most options should go into CATALINA_OPTS.
#
# JAVA_OPTS=""
#
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
40
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
4.3.3 Override Tomcat Default Home Page
If the user forgets to specify “/awc” (or /tc/webclient) at the end of the URL for accessing the
Teamcenter Active Workspace application (or webclient), then the default Tomcat Home
(Administration) page will be displayed. To override this behavior and have Tomcat default to
the standard Teamcenter Active Worskpace login (or webclient login) page, do the following:
1) Navigate into the directory where Tomcat is installed, for example:
“/opt/Tomcat”
2) Open the” webapps” directory within the Tomcat directory
3) Place a copy of the Teamcenter Active Workspace war file (for example: awc.war and/or
tc.war) in this directory. Deploy the war file by starting Tomcat (this action will create the
“awc” and/or “tc” directory within webapps). Once the war file is deployed stop Tomcat.
4) Change into the “ROOT” directory (“webapps/ROOT”)
5) If a file named “index.html” already exist then rename that file to “index-orig.html”. Create
a file called “index.html” within the ROOT directory that contains the following four (4)
lines:
For an Active Workspace Client:
<html>
<head><meta http-equiv="refresh" content="0;URL=/awc/">
</head><body></body>
</html>
For a webclient:
<html>
<head><meta http-equiv="refresh" content="0;URL=/tc/webclient/">
</head><body></body>
</html>
6) Now when Tomcat is running and the user specifies the URL (for ex: http://Server.domain or
http://server.domain:port) without the “/awc” or “tc” then Tomcat will redirect the request to
the Teamcenter Active Workspace login screen or webclient login as if the user had specified
the URL with “/awc” or “tc” specified.
For example for an Active Workspace Client:
http://Server.domain/awc or http://server.domain:8080/awc
For a webclient:
http://Server.domain/tc/webclient or http://server.domain:8080/tc/webclient
The original Tomcat Home (Admin) page is available as: http://server.domain /index.jsp or
http://server.domain:port/index.jsp or http://server.domain:port/index-orig.html (if indexorig.html exist).
NOTE: For Teamcenter for Systems Engineering (TcSE) installations see 6Appendix B
Override Tomcat Default Home Page for Teamcenter Systems Engineering (TcSE)
Installations.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
41
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
4.3.4 Additional Linux/Unix References for Tomcat Tuning
4.3.4.1 Tomcat Running as a Service for Linux:
http://tomcat.apache.org/tomcat-8.0-doc/setup.html
http://tomcat.apache.org/tomcat-8.0-doc/RUNNING.txt
https://gist.github.com/miglen/5590986
Apache Tomcat 8 Start stop script init.d script
http://wiki.openkm.com/index.php/Configure_Tomcat_service_linux (this is for Tomcat 7 but
should work for Tomcat 8)
4.3.4.2 Tomcat Native Library for Linux items:
http://tomcat.apache.org/native-doc/
4.3.4.3 Tomcat SSL for Linux:
https://www.youtube.com/watch?v=OOFMpUZjito
https://www.youtube.com/watch?v=FSNMvdrXl3A
https://www.youtube.com/watch?v=rVt6g5AZ6ko
https://www.youtube.com/watch?v=yVAjpdLeqbw
4.3.4.4 Tomcat using HugePages for Linux:
https://jose-manuel.me/2012/11/how-to-enable-the-jvm-option-uselargepages-in-redhat/
http://www.oracle.com/technetwork/java/javase/tech/largememory-jsp-137182.html
https://oracle-base.com/articles/linux/configuring-huge-pages-for-oracle-on-linux-64
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
42
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
5 Summary
This document is focused on optimizing the Tomcat deployment for the Microsoft Windows
environment. Where possible, all areas of potential optimization were included to ensure
maximum performance and scalability for Tomcat in support of a Teamcenter deployment.
While Windows centric, the section included in this document conceptually would apply to
different Operating Systems. The path structure would be different but the overall information is
basically the same.
If you have any questions specific to this document contact the Siemens PLM Americas Zone
Technology Office – Infrastructure and Performance at:
S. Schweyher – Project Manager, Americas Zone Technology Office
L. Carlson – Director, Americas Zone Technology Office
G. Herran – Technical Expert, TcSE and Teamcenter Services
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
43
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
6 References
1
Oracle Corporation. Java SE 7 Archive Downloads. Retrieved from
http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html
2
The Apache Software Foundation. Apache Tomcat 8 Documentation Index. Retrieved from
http://tomcat.apache.org/tomcat-8.0-doc/index.html
3
The Apache Software Foundation. Index of /dist/tomcat-8/v8.0.17/bin. Retrieved from
http://archive.apache.org/dist/tomcat/tomcat-8/v8.0.17/bin/
4
The Apache Software Foundation. Apache Tomcat 8 SSL/TLS Configuration HOW-TO.
Retrieved from http://tomcat.apache.org/tomcat-8.0-doc/ssl-howto.html
5
Java Notes. Configuring two-way SSL authentication on Tomcat. Retrieved from
https://tomcat.apache.org/tomcat-8.5-doc/ssl-howto.html
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
44
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
Appendix A Apache Tomcat Installation & Tuning
Checklists for Windows and Linux/Unix
Tomcat Installation &Tuning Checklist for Windows
JDK Installation
Install a supported version of JDK (1.7.0_80 or higher)
Download from:
http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloadsjavase7-521261.html
Tomcat Installation
Download Tomcat 8.0.1.7 from:
http://archive.apache.org/dist/tomcat/tomcat-8/v8.0.17/bin/
Start Tomcat
Test Tomcat operational status from http://localhost:8080
Stop Tomcat
Tomcat Tuning and Configuration
Tune Java Memory
Low to Medium Loads: Initial/Max memory = 2048
High Loads:
Initial/Max memory = 4096
Tune Java Garbage Collection
Add parameters to Java Options:
-XX:+UseParallelGC
-XX:+UseParallelOldGC
-XX:+AlwaysPreTouch
-XX:NewRatio=1
-XX:SurvivorRatio=6
-XX:+DisableExplicitGC
-Xverify:none
Tune Java to Enable Large Page Support
Add parameters to Java Options:
-XX:+UseLargePages
-XX:LargePageSizeInBytes=4m
Enable Large Page Support via Local Security Policy
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
A-1
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
Tomcat Installation &Tuning Checklist for Windows
Backup and Modify server.xml file to enhance performance and remove 2MB limit for
document import
o Set socketBuffer = "32768" (default size is 9000)
o Set maxPostSize="-1"
o Set SavePostSize="-1"
Backup and Modify context.xml file to deploy Teamcenter Security Services (TcSS) on
the same Tomcat app server as Teamcenter
o Set useHttpOnly="false"
Backup and Modify Web.xml file to implement Production Setting
o Set development parameter to false
o Set reloading parameter to false
Override default Tomcat home page
Delay Tomcat start on Pool Server
Set Up SSL Support
Install Native Library
Download from:
http://tomcat.apache.org/download-native.cgi
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
A-2
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
Tomcat Installation &Tuning Checklist for Linux/Unix
JDK Installation
Install a supported version of JDK (1.7.0_80 or higher)
Download from:
http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloadsjavase7-521261.html
Tomcat Installation
Download Tomcat 8.0.1.7 from:
http://archive.apache.org/dist/tomcat/tomcat-8/v8.0.17/bin/
Start Tomcat
Test Tomcat operational status from http://localhost:8080
Override default Tomcat home page
Stop Tomcat
Tomcat Tuning and Configuration
Backup and Modify context.xml file to deploy Teamcenter Security Services (TcSS) on
the same Tomcat app server as Teamcenter
o Set useHttpOnly="false"
Backup and Modify server.xml file to enhance performance and remove 2MB limit for
document import
o Set maxPostSize="-1"
o Set SavePostSize="-1"
o Set socketBuffer = "32768"
Backup and Modify Web.xml file to implement Production Setting
o Set development parameter to false
o Set reloading parameter to false
Tune Java Memory
Add parameters to CATALINA_OPTS variable definition:
-Xms4g -Xmx4g
Tune Java Garbage Collection
Add parameters to CATALINA_OPTS variable definition:
-XX:+UseParallelGC
-XX:+UseParallelOldGC
-XX:+AlwaysPreTouch
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
A-3
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
Tomcat Installation &Tuning Checklist for Linux/Unix
-XX:NewRatio=1
-XX:SurvivorRatio=6
-XX:+DisableExplicitGC
-Xverify:none
Tune Java to Enable Large Page Support
Add parameters to Java Options:
-XX:+UseLargePages
-XX:LargePageSizeInBytes=4m
Enable Large Page Support via Local Security Policy
Run Tomcat as a Service for Linux
Tomcat Native Library for Linux
Tomcat SSL for Linux
Tomcat Using Huge Pages for Linux
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
A-4
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
Appendix B
Override Tomcat Default Home Page for
Teamcenter Systems Engineering (TcSE)
Installations
If the user forgets to specify “/tcr” at the end of the URL for accessing the Teamcenter Systems
Engineering application, then the default Tomcat Home (Administration) page will be displayed.
To override this behavior and have Tomcat default to the standard TcSE splash page, do the
following:
1) Navigate into the directory where Tomcat is installed, for example:
“C:\Program Files\Apache Software Foundation\Tomcat 8.0”
2) Open the” webapps” directory within the Tomcat directory
3) Place a copy of the TcSE war file (for example: tcr.war) in this directory. Deploy the war
file by starting Tomcat (this action will create the “tcr” directory within webapps). Once the
war file is deployed stop Tomcat.
Note: When replacing a previously deployed war file, you must remove or rename the
existing directory before deploying the replacement war file in order for the changes to take
effect. In this case a previously deployed war file directory will exist in the “webapps”
directory with the name of the war file. This folder was created when the war file was
deployed and Tomcat was started for the first time. This directory will not be updated if a
newer version of the war file with the same name is deployed into the “webapps” directory.
Unlike Jboss which will rewrite the expanded directory, Tomcat deployments are static. A
new directory will be created when Tomcat is restarted.
4) Change into the “ROOT” directory (“webapps\ROOT”)
5) If a file named “index.html” already exist then rename that file to “index.htm”. Create a file
called “index.html” within the ROOT directory that contains the following four (4) lines:
<html>
<head><meta http-equiv="refresh" content="0;URL=/tcr/">
</head><body></body>
</html>
6) Now when Tomcat is running and the user specifies the URL (for ex: http://Server.domain or
http://server.domain:port) without the “/tcr” then Tomcat will redirect the request to the
TcSE splash screen as if the user had specified the URL with “/tcr” specified (for ex:
http://Server.domain/tcr or http://server.domain:8080/tcr)
NOTE: The original Tomcat Home (Admin) page is available as: http://server.domain /index.jsp
or http://server.domain:port/index.jsp or http://server.domain:port/index.htm (if index.htm exist).
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
B-5
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
Appendix C Delay Tomcat Start on Database Server for
Teamcenter for Systems Engineering (TcSE)
Installations
If the Tomcat instance is being installed on the Windows Teamcenter server (single server
model, both database and application server on the same server) then you can configure the
Tomcat Service to not start until the Versant database is ready to be accept connections.
To configure Tomcat to wait for Versant to be ready to accept a connection you will use regedit
to add a dependency to Tomcat for the “VersantD” service. Once this is done Windows will not
start Tomcat unless the VersantD service is running.
Execute “regedit” via a Run pop-up.
You may have to ok regedit making changes to the system.
Before doing anything create a backup of the registry. Highlight Computer and then rightclick and select export.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
C-6
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
Specify the name and location of the file that the Export will create.
Expand folders as shown to get to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
C-7
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
Within services, scroll down and select Tomcat7.
If DependOnService is missing from the right panel then you will need to create that item. To
create a DependOnService item: right-click in the right panel and select New then Multi-String
Value. Specify the name of DependOnService and then set the value to be VersantD.
If the DependOnService name exists, then modify the value as shown below to add the
VersantD service. Start by right-clicking on DependOnService and selecting Modify
After selecting Modify the following display should be seen with current dependencies shown.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
C-8
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
Add VersantD within the Value data area and click OK.
VersantD is now listed as one of the data items for the DependOnService.
After closing regedit, start the services utility. Highlight Apache Tomcat 8.0, right-click and
select Properties to ensure that the dependency has been accepted.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
C-9
White Paper | Apache Tomcat 8 Installation & Tuning Guide for Teamcenter
On the Apache Tomcat 8.0 Tomcat8 Properties pop-up, select the Dependencies tab and verify
that Versant Database Connector is now in the list of depends on services, as shown below.
Now Tomcat will only run when Versant is ready to accept connections. NOTE: this feature is
only valid when Tomcat and Versant are running on the same server (physical or VM). If
Tomcat is running on a separate server then this feature cannot be used.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
C-10
Download