Installation on Linux

This article presents step by step the installation of Comarch ERP Enterprise on a server with CentOS Linux 7 operating system and PostgreSQL database engine.

Requirements

Note
An overview of the necessary components as well as the supported Linux and PostgreSQL versions may be found in the System Requirements documentation.

The following instruction refers to:

  • Operating system: Linux CentOS 7
  • Database engine: PostgreSQL 9.2.24

Prior to the installation, it is necessary to verify what follows:

  • whether the postgres user (the default PostgreSQL engine user) can log in to the system with the command: su postgres
  • a port on which the SQL server is running; this port will be used later in this instruction. By default, it is 5432
  • free hard drive space. Installation files and the installed system generally require 30 GB of free disk memory
  • access to root or another user with sudo permissions
  • requirements specified by CentOS Linux and PostgreSQL, and the installation of necessary software updates
Note
For file operations, it is possible to use the system’s built-in tools, tools installed later, or a file explorer, such as WinSCP (for ssh connections made from Windows).
Note
Due to the nature of the operating system, it may be necessary to increase the permissions to some files and directories, including the permission to execute .sh files.

Conventions

A uniform directory structure should be ensured, especially when multiple systems are maintained on a single server.

Note
In this article, the name CUS610 is an example of a system name. It must be replaced with a proper name that matches the system being installed.

Directories and installation package

The following installation directories should be created through the commands:

  • mkdir /opt/comarch
  • mkdir /opt/comarch/CUS610 – a directory in which the system will be installed
  • mkdir /opt/comarch/CIS610PB – a directory with the installation package

The CEE system installation package should be unpacked in the location /opt/comarch/CIS610PB. The package contains system files, scripts, and other files necessary during the installation.

Installation of JDK

Comarch ERP Enterprise is based on the Java programming language and requires the Java Development Kit (JDK) as a runtime environment.

Required JDK version for Comarch ERP Enterprise system release:

Comarch ERP Enterprise system release JDK version
6.1 11

The JDK installation procedure described below is only required in the case of the first installation or modification of the JDK version.

Procedure: Installation of Java JDK

The current JDK version 11 package is available for download at https://adoptopenjdk.net/. After downloading it, the following steps should be performed:

  1. Place the downloaded package on the server
  2. Create the directory mkdir /opt/comarch/java/
  3. Extract the downloaded package *.tar.gz on the server in the created location (/opt/comarch/java/)

Installation of Comarch ERP Enterprise

The installation package of Comarch ERP Enterprise contains an archive with Comarch ERP Enterprise files, as well as necessary scripts for the PostgreSQL database engine.

Creating the databases

Database creation involves running scripts from the installation directory. For this purpose, it is necessary to log in to the postgres user.

su – postgres

Next, it is necessary to open the directory containing database creation scripts:

cd /opt/comarch/CIS610PB/install/scripts/linux/postgres/tools/

In this directory, the crtdbenv.sh script should be run, with the following parameters:

Example
./crtdbenv.sh -a -n <database_name> -p <SQL_server_port>

The script will create one empty database on the SQL server. It is necessary to use this script and create three different databases:

  • configuration database
  • repository database
  • OLTP production database

The following commands run the scripts that create the databases listed above:

./crtdbenv.sh -a -n CUSCF -p 5432

./crtdbenv.sh -a -n CUS610RP -p 5432

./crtdbenv.sh -a -n CUS61000 -p 5432
Note
The abovementioned parameters need to be adjusted to custom names of databases and server ports, according to the system’s naming conventions.

After the operation, it is necessary to log in to the root operator again using the command:

su root

Extracting the system directory

In the /opt/comarch/CIS610PB/ location, there is a semiramis.zip file. The file contains the main system directory. It should be extracted in the default system directory, i.e. /opt/comarch/CUS610/.

The instruction for extracting the package in the correct location:

unzip /opt/comarch/CIS600PB/semiramis.zip -d /opt/comarch/CUS610
Note
The user can use any tool to extract the ZIP package; the instruction above uses the Unzip tool. It may be necessary to install this utility in the system using the following command:

yum install unzip -y

After extracting the package, there should be a semiramis directory in the CUS610 directory.

Patch

A patch allows running the system on swapped files or with additional files without interfering with the original directory structure.

Patches may be uploaded to the directory /opt/comarch/CUS610/semiramis/patch/. Uploaded packages must have the same directory structure as the directories in the semiramis folder.

From the directory where the installation files are stored, it is necessary to copy the entire com directory containing the patch files. It should be placed in the location /opt/comarch/CUS610/semiramis/patch/cisag/. The following cp command performs the copy:

cp -r /opt/comarch/CIS610PB/com/ /opt/comarch/CUS610/semiramis/patch/cisag/

The patch copied in this step will be used when filling the database in the Filling the databases step.

Connecting to the configuration database

In this step, connection to the configuration database is established. The crtconnprop.sh script is run for this purpose. It takes the following arguments in turn:

  • system name
  • location of the databases installation directory
  • ID for PostgreSQL engine = 9
  • JDBC ID for PostgreSQL engine = 13
  • SQL server network address
  • configuration database name
/opt/comarch/CIS610PB/install/scripts/linux/crtconnprop.sh CUS610 /opt/comarch/CIS610PB /install/databases 9 13 jdbc:postgresql://localhost:5432 CUSCF

Importing the system license and saving information on the configuration database

A supplied software license is required to install the system.

Before executing the following instructions, it is necessary to copy the CEE system license file to the server, for instance, to the location: /opt/comarch/CIS610PB/.

To import the certificate and save information on the configuration database, the cfgsys.sh script is run. It takes the following arguments in turn:

  • system location
  • JDK directory location
  • location where the license file is stored
  • license file name
  • license password
  • name of the .jar file responsible for the PostgreSQL database engine = postgresql-9.4.1212.jar
/opt/comarch/CIS610PB/install/scripts/linux/cfgsys.sh /opt/comarch/CUS610 /opt/comarch/java/jdk-11.0.7+10 /opt/comarch/CIS610PB/ 400-CUS610-01-CUS610.lic passwrd postgresql-9.4.1212.jar

Verifying the connection.properties file

In the /opt/comarch/CIS610PB/install/databases/ location, there is a connection.properties file.
Before the next step, it is necessary to modify its content, as, on its basis, empty databases will be filled with basic objects and data. The file is composed of records with the following structure:

<database_name>.<parameter>:<value>

At the very bottom of theconnection.properties file, after the word databases:, all the databases for which the configuration is to be used to complete the database in the next step are listed.

Parameters:

  • source – it points to the name of the master database from the database directory
  • ContentType – database type ( 1 – configuration, 2 – repository, 3 – OLTP, 4 – OLAP)
  • Type – ID for the database engine (PostgreSQL = 9)
  • Driver – JDBC ID for the database engine (PostgreSQL = 13)
  • DriverAccessPath – a network location of the SQL server
Example

An example of the content of a file completed for installation:

CUSCF.source:CONFIGURATION_CIS600PBCF

CUSCF.ContentType:1

CUSCF.Type:9

CUSCF.Driver:13

CUSCF.DriverAccessPath:jdbc:postgresql://localhost:5432/CUSCF

 

CUS61000.source:OLTP_CIS600PB02

CUS61000.ContentType:3

CUS61000.Type:9

CUS61000.Driver:13

CUS61000.DriverAccessPath:jdbc:postgresql://localhost:5432/CUS61000

 

CUS610RP.source:REPOSITORY_CIS600PBRP

CUS610RP.ContentType:2

CUS610RP.Type:9

CUS610RP.Driver:13

CUS610RP.DriverAccessPath:jdbc:postgresql://localhost:5432/CUS610RP

 

databases:CUS610RP, CUS61000, CUSCF

Filling the databases

After executing the following command, the databases indicated in the connection.properties file will be filled with structure, objects, and basic data.

A patch that modifies the ImportSystem class will be used here.

/opt/comarch/java/jdk-11.0.7+10/bin/java -cp /opt/comarch/CUS610/semiramis/classes:/opt/comarch/CUS610/semiramis/lib/postgresql-42.2.6.jar:/opt/comarch/CUS610/semiramis/patch/classes:/opt/comarch/CUS610/semiramis/lib/cisag-se.jar com.cisag.sys.kernel.sql.ImportSystem -d:/opt/comarch/CIS610PB/install/databases

Application server startup script

Each CEE system must have at least one application server (SAS). The default server is: MESSAGESERVER.

To run this server, a script is needed which will start the system instance.
For this purpose, it is necessary to:

  1. Create a directory for the application server (SAS)
mkdir /opt/comarch/EGERIASUPPORT/semiramis/servers/MESSAGESERVER
  1. Create a file strass-MESSAGESERVER.sh:
vi /opt/comarch/CUS610/semiramis/servers/MESSAGESERVER/strass-MESSAGESERVER.sh
  1. Fill the file with the content below. The parameters need to be adjusted to the system being installed:
  • SAS – application server name
  • SYSTEM – system name
  • SYSTEM_DIR – directory where the CEE system is located
  • JDK – directory where JDK is located
export SAS="MESSAGESERVER"

export SYSTEM="CUS610"

export SYSTEM_DIR="/opt/comarch/${SYSTEM}"

export JDK="${SYSTEM_DIR}/jdk"




export SEMIRAMIS_START="rlwrap semiramis.sh -toolUser:ADMINISTRATOR ${SAS}"

#export SEMIRAMIS_REMOTE_JCONSOLE=20010




if [ "x${SEMIRAMIS_LOCAL}" != "x" ]; then

"${SEMIRAMIS_START}"

exit 0

fi




export SEMIRAMIS_LOCAL="${SYSTEM_DIR}/semiramis"




cd "${SEMIRAMIS_LOCAL}/servers/${SAS}"




#echo "\"${SEMIRAMIS_LOCAL}/bin/unix/env.sh\" \"${JDK}\" \"${SEMIRAMIS_LOCAL}\""

"${SEMIRAMIS_LOCAL}/bin/unix/env.sh" "${JDK}" "${SEMIRAMIS_LOCAL}"

Finishing the editing, saving in the Vim editor:

:x

It is necessary to run the following commands to create system links to JDK and enable the running of the startup script:

ln -s /opt/comarch/java/jdk-11.0.7+10 /opt/comarch/CUS610/jdk

chmod 755 /opt/comarch/CUS610/semiramis/servers/MESSAGESERVER/strass-MESSAGESERVER.sh

chmod 755 /opt/comarch/CUS610/semiramis/bin/unix/*.sh

Running Comarch ERP Enterprise Application Server

To start the application server for the first time, it is necessary to follow these steps:

  1. Navigate to the application server directory:
cd /opt/comarch/EGERIASUPPORT/semiramis/servers/MESSAGESERVER
  1. Execute the script to start SAS:
./strsas-MESSAGESERVER.sh
Note
SAS stores log in the directory: /opt/comarch/EGERIASUPPORT/semiramis/servers/MESSAGESERVER/log

Creating database information

In order for the system to properly use the databases declared in the system, the commands that create database information must be executed.

When the application server starts correctly, a message is displayed: ADMINISTRATOR@MESSEAGESERVER>

At this point, it is necessary to issue commands in the application server shell.

To create information on databases (configuration, repository, OLTP), it is necessary to execute the following commands one at a time in the recommended order:
crtdbinf -configuration

crtdbinf -repsitory

crtdbinf -oltp

Changing the SAS URL

Note

The following instructions do not address the configuration work that a network administrator must perform to make the server on which the application server is to be running available at the indicated URL.

By default, SAS is registered to the URL https://localhost. In order to change this address, the following steps need to be completed:

  1. Run SAS MESSAGESERVER (if it is not running)
  2. To access a running Comarch ERP Enterprise application server via web browser by typing a relevant URL, an HTTPS connection is recommended; for this reason, a certificate is required. An example of the address may be https://CEE.yourcompany.com

Note
The address specified in the URL must match the server address and have an appropriate DNS configuration.

The following command for the application server will change the URL from the original one (https://localhost) to the desired one where SAS is available:

chgsas -sas:MESSAGESERVER -baseURL:https://CEE.yourcompany.pl

To acknowledge the warning on the keyboard, the [y] key should be selected.

Example
SYS-3046 Change of the “LOCALHOST” application server of the “CUS610” system.

The following warnings are displayed:

Warning: SYS-3511 The host name from the base URL is not the same as the “Issued for” value from the certificate. The Comarch ERP Enterprise Application Server certificate must be generated again so that clients can recognize this server and log on to it. Without a new certificate, clients will not verify the server identity and would refuse to log on. Confirm these warnings: y=yes, n=no, a=all

  1. The following command will generate a new server certificate for the base URL defined for SAS:
crtsascert -sas:MESSAGESERVER -issuer:COMARCH
  1. The following command will set the file server directory for SAS files:
chgsas -sas:MESSAGESERVER -fileServerDirectory:/opt/comarch/CUS610/semiramis
  1. The restart command will once again run SAS MESSAGESERVER of Comarch ERP Enterprise system.
  2. Now, the web server contained in the application server will accept connections to the URL https://CEE.yourcompany.com on the basis of the newly issued server certificate.

Logging in to Comarch ERP Enterprise

The first login to the system via the browser is done by entering a login and password.

Login: ADMINISTRATOR

Password: 1234567

Note

After logging in for the first time, it is necessary to change this user’s password and generate a certificate for this user. The certificate should be stored in a secure location.

It is recommended that all users log in through individually issued certificates.

The user should install a .PFX certificate on their personal computer. Once the certificate is installed, the user will be able to access https://CEE.yourcompany.com. During the authentication stage, a window will appear asking the user to indicate the installed certificate. The indicated certificate is remembered by the browser within the browser session.
Logging in to another user account using a different certificate can be done by restarting the browser or in a private mode.

Running the application server as a service

The following chapter presents the simplest way to allow the application server to start along with the operating system startup. For this purpose, the Crontab tool will be used; it is necessary to complete the following steps:

  • Type the command in the system shell: crontab -e
  • Add the line:
@reboot sleep 80 && /opt/comarch/CUS610/semiramis/servers/MESSAGESERVER/strass-MESSAGESERVER.sh
  • Save and finish the editing by the command:
    :wq
Note

The same effect can also be achieved with other CentOS mechanisms.

Uninstallation of Comarch ERP Enterprise

To uninstall Comarch ERP Enterprise, it is necessary to follow these steps:

  1. Exit all servers that have access to the database
  2. Invoke a script to delete objects (roles, databases) associated with the selected CEE system on the database engine
    /opt/comarch/CIS610PB/install/scripts/linux/postgres/tools/dltdbenv.sh -a -n CUS610

The abovementioned script takes the following parameters:

  • -a – delete all
  • -n <system_name> – system name
  1. Delete files saved in the /opt/comarch/CUS610/ directory
  2. Comarch ERP Enterprise system is now uninstalled

Czy ten artykuł był pomocny?