. . .

Manual installation

Parts of this page contains outdated information. Please use the automatic installation via installer.


Introduction

This document describes all necessary steps for an Enterprise Installation of ApiOmat.

Installation on Windows Server 2008 R2 / 2012 / 2012 R2

Preparation

Ports

The following ports need to be opened in the firewall of the application server (Run -> "WF.msc"; or "Control Panel\System and Security\Windows Firewall" -> "Advanced settings"; then "Action" -> "New Rule"):

  • TCP 8080 (HTTP)

  • UDP 123 (NTP)

  • TCP 5701 (Hazelcast)

  • TCP 2022 (FTP)

  • TCP 2300 ( FTP )

Time sync

The server needs to sync its time with a NTP server.

Find out where the server currently gets it's time:

w32tm /query /status

If the source is the local CMOS clock, a NTP server needs to be set.

To check the difference between the local server time and the NTP server time:

w32tm /stripchart /computer:europe.pool.ntp.org /samples:5 /dataonly

To set up the synchronization with a NTP server, execute the following in a command prompt with elevated rights (Administrator):

w32tm /config /manualpeerlist:europe.pool.ntp.org /syncfromflags:manual /update

Restart the time service:

net stop w32time && net start w32time

Re-check the status with the command mentioned at the beginning. The source should now be europe.pool.ntp.org.

Other

If the external IP of the system is not accessible (test with ping), add the IP to C:\windows\system32\drivers\etc\hosts

Installation

JDK

  1. Download newest 1.8 version http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

  2. Install JDK to C:\Java\jdk8 and JRE to C:\Java\jre8

  3. Download Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files for JDK/JRE 8 and unpack contents to C:\Java\jdk\jre8\lib\security and C:\Java\jre8\lib\security

  4. Create an environment variable for Java:

    1. Control Panel\System and Security\System -> Advanced system settings -> environment variables -> system variables -> "New...")

    2. Variable name: JAVA_HOME

    3. Variable value: C:\Java\jdk8

Tomcat

  1. Download the newest Tomcat Service Installer from Apache website http://tomcat.apache.org/tomcat-8.5-doc/index.html

  2. Choose to install the following components: Tomcat Core, Service Startup, Native

    1. Do NOT install the "Manager" or "Host Manager"

  3. Select JDK instead of JRE path during installation!

  4. Install to C:\tomcat8

  5. Open C:\tomcat8\conf\server.xml

    1. change port if necessary (standard is <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />)

    2. Comment in (activate) the SimpleTCPCluster line

  6. Create a C:\tomcat8\conf\apiomat.yaml (comment in "isEnterpriseInstallation" and "licenseKey")

  7. Create a C:\tomcat8\conf\log4j.xml

  8. Create a C:\tomcat8\conf\hazelcast.xml

  9. Create C:\tomcat8\conf\security.policy file containing:

    grant {
    permission java.security.AllPermission;
    };

    Open "Monitor Tomcat" application from start menu

    1. Open "Java" tab

    2. Check "Use default"
      Append the following lines in the Java Options field (don't replace the existing ones):

      -Djava.io.tmpdir=C:\tomcat8\temp
      -ea
      -Xms2048m
      -Xmx2048m
      -XX:MaxPermSize=256m
      -Dapiomat.config=C:\tomcat8\conf\apiomat.yaml
      -Dpasswordpolicy.config=C:\tomcat8\conf\passwordpolicy.json
      -Dlog4j.config=C:\tomcat8\conf\log4j.xml
      -Dhazelcast.config=C:\tomcat8\conf\hazelcast.xml
      -Djava.security.policy=C:\tomcat8\conf\security.policy
    3. In Startup tab, set "mode" to "java"

    4. In Shutdown tab, set "mode" to "java"

  10. Open Services (Run -> "services.msc"; or Task Manager -> Services -> "Services..."). Choose Apache Tomcat 8, Properties, and set Startup type to "Automatic (delayed)"

MongoDB

  1. Download MongoDB in the Windows 64bit version http://www.mongodb.org/downloads

  2. Follow the installation instructions on https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/

  3. Start the MongoDB service

Restore Script

Create the following script (e.g. C:\Users\Administrator\restorescript.cmd):

@echo off
REM Script which copies DB backups to restoreModule folder
@echo off
 
for /f "usebackq delims== tokens= 2" %%i in (
`WMIC OS GET localdatetime /format:value`
) do set localTime=%%i
 
set "YYYY=%localTime:~0,4%"
set "M=%localTime:~4,1%"
set "MM=%localTime:~5,1%"
set "D=%localTime:~6,1%"
set "DD=%localTime:~7,1%"
 
if %M%==0 set M=
if %D%==0 set D=
 
 
set BACKUPDATE=%YYYY%-%D%%DD%-%M%%MM%
set DUMPDIR="C:\mongodb\restoreModule\%BACKUPDATE%"
 
C:\mongodb\bin\mongodump -o %DUMPDIR%

Set up the scheduler to execute the script on a daily basis:

Control Panel\System and Security\Administrative Tools -> "Task Scheduler"

Select "Action" -> "Create Basic Task" and follow the wizard's instructions.

ApiOmat as Web Application Archive (WAR)

Download the following .war files from the build server. If you have them on your local computer, upload them to the remote machine via RDP/VNC (when using Remmina as client on Ubuntu you have to enable a shared folder):

  • yambas.war for the middleware

  • apidocs.war for the REST API documentation

  • docs.war for the ApiOmat documentation

Place these files into the webapp directory of tomcat: C:\tomcat8\webapps. Delete all files and folders in this directory before!

Restart Tomcat. Wait a minute or two to let ApiOmat initialize and start.

When visiting "http://localhost:8080/yambas/rest" from the server itself with a browser, it should display the version of ApiOmat and the IP address it's running on. Depending on your server setup (firewall, DNS, ...) it might also be possible from externally with "http://yourserver.tld:8080/yambas/rest".

Dashboard

The Dashboard is a php Application, so you need to install some dependencies first:

Apache Web Server

Download the Apache Web Server (Apache HTTPD) ZIP archive (e.g. "httpd-2.4.12-win32-VC11.zip" and extract it to "C:\Apache24" (depending on the version).

For the configuration, make a backup of "C:\Apache24\httpd.conf" (e.g. to C:\Apache24\httpd.conf.orig) and then replace the content by this.

To install the service, open a command line and type:

cd "C:\Apache24\bin"
httpd -k install

PHP

Download the PHP ZIP archive (e.g. "php-5.6.7-Win32-VC11-x86.zip" and extract it to "C:\PHP".

For the configuration, make a backup of "C:\PHP\php.ini" (e.g. to "C:\PHP\php.ini.orig") and then replace the content by this.

PEAR

Download PEAR (e.g. "go-pear.phar"), place it somewhere and run it with PHP. You have to change into the PHP directory before, so that PEAR can use this directory as its default installation directory:

cd "C:\PHP"
php.exe "C:\somewhere\go-pear.phar"

Dashboard as ZIP Archive

Download the latest release from the build server.

Place the "dashboard" folder into "C:\Apache24\htdocs". The "dashboard" directory should only contain the following 3 directories: "apiomat", "framework", "requirements".

* link only available in Enterprise Documentation