PreconditionsJDBC driver for one of the following databases:Oracle: http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/ (The driver version must match the database version. Current driver provided by the deployment: ojdbc5 - 11.2.0.3.0) Microsoft SQL Server: http://msdn.microsoft.com/data/jdbc/ (The driver version must match the database version. Current driver provided by the deployment: mssql-jdbc - 6.2.2.jre8) Provided by Amana:You should find the following folder structure in your distribution after unpacking the provided ZIP file: databasescript → all necessary update scripts for the database deployment → war-file with the current application Installation of the Apache Tomcat Server- In the following we assume an installation on a Windows operating system. An installation on a Unix-like system differs only in the paths and the installation procedure described under 2. and 3.
- Install the recommended JAVA version and either create the system variable "JAVA_HOME" which points to the installation directory or set the JavaHome path in the Tomcat start scripts. Be sure to disable the automatic Java updates.
- Install the Apache Tomcat Server into a directory of your choice (Please note: too deep subdirectory structures can lead to path length problems). In the following the directory "C:\Server\Tomcat" is assumed. This is explained in detail:
- We recommend to install the start menu entries to simplify the configuration.
- The ports used by Tomcat can be customized to your needs.
Configuration of the Tomcat Server:After the installation run the application ->Start menu->Tomcat->"configure tomcat".Execute the following steps: - In the "General" window: Set the start of the service to automatic. - Enter "128" in the Initial Memory Pool window. - In the Maximum Memory Pool window, enter about half of the available physical RAM. For 32 bit systems please consider the limitation of the RAM to approx. 3.5 GB. The memory settings configured here influence the performance and operability of the application. - These may have to be adjusted over time as the use of the product increases.In the web.xml in the conf directory of the Tomcat server (%TOMCAT_HOME%/conf) a <init-param> block with parameter "mappedfile" = false must be added in the servlet with name <servlet-name>jsp</servlet-name> section. Code Block |
---|
| <servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<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>mappedfile</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet> | The following adjustments should be made in the context.xml of the Tomcat server:We recommend increasing the cacheMaxSize attribute of the Resources element to 100000 kilobytes (100MB): Code Block |
---|
language | xml |
---|
title | content.xml |
---|
| <WatchedResource>WEB-INF/web.xml</WatchedResource>
<Resources cachingAllowed="true" cacheMaxSize="100000" /> | Please copy the deployment (usually "vat.war") from the deployment folder of your distribution into the "webapps" directory in the Tomcat installation directory.Setting up the DatabaseThe steps for setting up the database are kept general at this point in order to do justice to the different configurations of the database systems. Create a new database/database schema on the database server.Create a database user with permission for CREATE, INSERT, UPDATE, DELETE, ALTER on this database. (For Oracle: CONNECT + RESSOURCE).Pleas Note for Oracle: As of Oracle 12, the Oracle user must receive quotas on his/a tablespace, e.g:ALTER USER amanavat QUOTA 1000M ON users;ALTER USER amanavat QUOTA UNLIMITED ON amanavat;Make sure that the database can be accessed from the application server with this user.Execute the scripts included in your distribution to create the data tables. Make sure that the user who imports the DB scripts has the necessary rights to create the table structure. Should, contrary to expectations, error messages occur during the execution of the scripts, please contact our support and send us the execution log.Variant 1: Configuration of JNDI (Datasource) database connection with user/passwordPlease copy the appropriate JDBC driver into the lib directory of the Apache Tomcat server (%TOMCAT_HOME%/lib). In the context.xml of the Apache Tomcat Server a corresponding resource entry for the database connection must be created within the <Context> block: Example Datasource entry for MSSQL: Code Block |
---|
language | xml |
---|
title | MSSQL Datasource |
---|
linenumbers | true |
---|
| <Resource name="jdbc/gtcvatdatasource" auth="Container"
type="javax.sql.DataSource" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://[SERVER-ADRESS]:[PORT];DatabaseName=[DATABASE_NAME]"
username="[USERNAME]" password="[PASSWORD]" maxTotal="20" maxIdle="10"
maxWaitMillis="-1"/> |
Example Datasource entry for Oracle: Code Block |
---|
language | xml |
---|
title | Oracle Datasource |
---|
linenumbers | true |
---|
| <Resource name="jdbc/gtcvatdatasource" auth="Container"
type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:@[SERVER-ADRESS]:[PORT]:[INSTANCE]"
username="[USERNAME]" password="[PASSWORD]" maxTotal="20" maxIdle="10"
maxWaitMillis="-1"/> |
Please adjust the SERVER-ADRESS of the database server, the database name and the user/password in the Datasource entry according to your database. Variant 2: Configuration of JNDI (Datasource) database connection with Windows userPlease copy the appropriate JDBC driver into the lib directory of the Apache Tomcat server (%TOMCAT_HOME%/lib). The database connection in the context.xml of the Tomcat server can alternatively be established via the Windows user in whose context the Tomcat is running. The following steps have to be performed: Download Microsoft SSPI driver (sqljdbc 7.0): https://www.microsoft.com/de-de/download/sqljdbc_7.0 Info |
---|
The used JAVA version is important: A 64-bit JAVA requires the x64 version of the driver, a 32-bit Java requires the x86 version. |
The driver is delivered in a self-extracting EXE, which can be unpacked e.g. by 7-Zip or alternatively the driver can be downloaded as tar.gz archive. Copy the sqljdbc_auth.dll from the subdirectory "/auth" into the "\windows\system32" directory of your Windows installation. Image RemovedCopy the file sqljdbc42 from the subdirectory of the driver "/jre8" into the "/bin" directory of your installed JAVA version (which is used by Tomcat). Image Removed Image RemovedIn the context.xml of the Tomcat server a corresponding datasource entry must be configured for the database connection: Code Block |
---|
language | xml |
---|
title | MSSQL Datasource |
---|
linenumbers | true |
---|
| <Resource
name="jdbc/gtcvatdatasource"
type="javax.sql.DataSource"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://[SERVER-NAME]\SQLEXPRESS;DatabaseName=[DATABASE_NAME];Integratedsecurity=SSPI"
maxTotal="20" maxIdle="10"
maxWaitMillis="-1"/> |
In addition, the Windows user must be entered in the "Tomcat Properties" - see illustration: Info |
---|
Please note that the user also has the right to log in as a "service", otherwise Tomcat will not start anymore. | Image RemovedTLS-Verbindung zum SQL-Server einrichtenAb der Treiberversion 10.x von mssql-jdbc (Microsoft SQL-Server) muss eine Verbindung ohne TLS explizit konfiguriert werden, ansonsten geht der Treiber von einer TLS-Verbindung aus und erwartet dafür vorgesehen Zertifikate. Um diese zu deaktivieren, muss die context.xml des Tomcat-Servers wie folgt erweitert werden: Code Block |
---|
language | xml |
---|
title | MSSQL Datasource |
---|
linenumbers | true |
---|
| <Resource name="jdbc/gtcvatdatasource" auth="Container"
type="javax.sql.DataSource" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://[SERVER-ADRESS]:[PORT];DatabaseName=[DATABASE_NAME];encrypt=false;trustServerCertificate=true"
username="[USERNAME]" password="[PASSWORD]" maxTotal="20" maxIdle="10"
maxWaitMillis="-1"/> |
Entscheidend sind encrypt=false und trustServerCertificate=true in der url. Wenn die TLS-Verbindung verwendet werden soll, dann werden folgende Informationen benötigt: Code Block |
---|
language | xml |
---|
title | MSSQL Datasource |
---|
linenumbers | true |
---|
| <Resource name="jdbc/gtcvatdatasource" auth="Container"
type="javax.sql.DataSource" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://[SERVER-ADRESS]:[PORT];DatabaseName=[DATABASE_NAME];hostNameInCertificate=[HOST_NAME_IN_CERTIFICATE];trustStore=[TRUSTSTORE_LOCATION];trustStorePassword=[TRUSTSTORE_PASSWORD]
username="[USERNAME]" password="[PASSWORD]" maxTotal="20" maxIdle="10"
maxWaitMillis="-1"/> |
Der SQL-Server muss mit einen Zertifikat abgesichert sein und dieses muss sich in einem TrustStore/KeyStore befinden. Sowohl der Pfade zum TrustStore als auch das Passwort werden mitgegeben und zusätzlich der HostName im Zertifikat. Informationen zu den Parametern: https://docs.microsoft.com/de-de/sql/connect/jdbc/setting-the-connection-properties?view=sql-server-ver16 Informationen zum Konfigurieren: https://docs.microsoft.com/de-de/sql/database-engine/configure-windows/manage-certificates?view=sql-server-ver16 https://docs.microsoft.com/de-de/sql/connect/jdbc/connecting-with-ssl-encryption?view=sql-server-ver16 https://docs.microsoft.com/de-de/sql/connect/jdbc/configuring-the-client-for-ssl-encryption?view=sql-server-ver16 Systemstart und Aktivierung- Starten Sie nun den Tomcat Applikationsserver entweder unter den Systemdiensten oder mit der „Configure Tomcat“ Applikation.
- Starten Sie einen Browser und geben in die Adressleiste ein (beachten Sie den bei „Installation Tomcat“ gewählten Port):
http://<IP-Adresse oder Hostname des Applikationsservers>:[Port]/vat - Es sollte nun eine Login-Seite laden, dort können Sie sich mit
Benutzer: superuser Passwort: test einloggen. - Nun sollte eine Webseite Sie zur Aktivierung auffordern. Schicken Sie eine E-Mail an Ihren Ansprechpartner aus unserem Haus.
- Wir senden Ihnen die Aktivierung in Form einer Textdatei zu. Dessen Inhalt kopieren Sie bitte in das untere Textfenster und bestätigen durch Klick auf „Aktivieren“.
- Sollte bei einem der vorherigen Punkte ein Fehler auftreten, prüfen Sie bitte die unter Einrichtung der Applikation eingetragenen Parameter und nehmen Kontakt mit uns auf.
Abschließende BemerkungenNach erfolgter Aktivierung des VAT@GTC ist die Installation erfolgreich abgeschlossen. Die Software kann nun den Fachabteilungen zur Benutzung oder fachlichen Tests übergeben werden. Zum Abschluss noch einige Anmerkungen: - Wir möchten empfehlen, eine regelmäßige Sicherung der Datenbank durchzuführen, da diese die Daten der Applikation enthält.
- Das Deployment muss nicht kontinuierlich gesichert werden. Hier reicht es, den Stand bei Auslieferung einer Version bereitzuhalten.
- Die durchgeführte Konfiguration sollten Sie dokumentieren, damit Anpassungen im Falle von Aktualisierungen des Systems oder einer Wiederherstellung nachvollzogen werden können. Insbesondere Anpassungen, die abweichend von diesem Dokument vorgenommen wurden, sind zu dokumentieren.
|