> For the complete documentation index, see [llms.txt](https://docs.editran.onesait.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.editran.onesait.com/documentacion-editran/open-v5.2.1-en/linux/instalacion.md).

# Installation

This document provides the Editran System installation manual.

Editran is a communications platform, developed by Indra, over data networks and the Internet that enables direct communication between computer applications residing on different machines and operating systems of different companies, organizations, and public or private entities.

This document describes the processes that must be carried out to install and configure the Editran System. It also includes the processes required to upgrade an installation to its next official version.

The manual is aimed at system administrators and it is assumed that the reader has the technical knowledge necessary to carry out the tasks described in it.

## Definitions

* **Presentation:** Set of parameters that in Editran define each transmission type.
* **Editran/GC:** Editran module for RSA key exchange.

## Prerequisites

### Hardware Requirements

The hardware characteristics of the equipment will depend on the level of workload expected in each deployment of the product. An indicative configuration is provided by installation type.

#### Processor

Given the diversity of different architectures existing for these operating systems, you should consult the equipment manufacturer to choose the one that best suits your needs. In general, product performance improves with:

* Higher processor speed.
* Greater number of cores/threads.

#### HDD Space

The required disk space depends largely on the maximum size of the transmitted files and how long they are kept on the equipment. Since this is not known in advance, only the following factors are taken into account:

* Space required for Editran software. It depends on the OS, but does not exceed 30 MB.
* Space required for product configuration data. Each defined transmission profile uses about 35 KB. The total number of transmissions to configure will depend both on the number of entities we need to communicate with and on the types of information exchanged. Therefore, for an average installation (250 different profiles), about 10 MB should be counted.
* Space for temporary files created by Editran during transmissions. For each transmission, disk space will be needed for three times the volume of data transferred. The table gives a recommended sizing based on the intended use of the product, based on the maximum number of concurrent transmissions and the volume of exchanged files.

#### HDD Sizing

| Load     | No. of Transmissions | File Size | HDD Space |
| -------- | -------------------- | --------- | --------- |
| Low      | 1 - 25               | 50 MB     | 20 GB     |
| Standard | 25 - 100             | 250 MB    | 140 GB    |
| High     | > 100                | 1 GB      | > 300 GB  |

#### Communications

* Ethernet network card for TCP/IP protocol.

#### Scalability and high availability solutions

At the infrastructure level for installations that have these needs, a virtualization solution is recommended. The implications this would have on the product:

* For this solution to provide scalability capabilities, it would have to be associated with the installation of multiple isolated Editran instances, each one managing its group of transmissions.
* It is necessary to install the Editran/PX component, which is configured to route incoming traffic to the corresponding instance.

#### Virtualization architecture

![virtualization architecture diagram](https://2807498471-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2W4cn5C1WDTJzDOR25es%2Fuploads%2Fgit-blob-da2fd5fca3544945d93d3783b4bbfb8a41f48e4e%2Fimage1.png?alt=media)

### Software Requirements

#### Operating Systems

In Unix environments, software packages are distributed for the operating systems and architectures in the table. The packages are generated and tested on the given versions of each OS; however, it is normal for them to be compatible with later versions.

#### Software packages

| OS              | Architecture | Name                                    |
| --------------- | ------------ | --------------------------------------- |
| Linux Red Hat 8 | X86\_64      | Editran-v5.2.1.x-x86\_64-redhat8.tar.gz |
| Linux Red Hat 9 | X86\_64      | Editran-v5.2.1.x-x86\_64-redhat9.tar.gz |

#### Additional software

* The package must be installed ***OpenSSL***. In fact, Editran only depends on the library **libcrypto** which provides the symmetric and public-key encryption algorithms used in its cryptography. For RHL8 the version to install is **1.1.1**, for RHL9 the version to install is **3.5**.
* A ***Java virtual machine***, from version **JRE-21**.

### Connectivity

* EDITRAN is a client/server protocol. To enable remote connections from any other entity, you must have Internet access with a fixed public IP assigned and an inbound and/or outbound open TCP port (by default EDITRAN uses port 7777).

> It is recommended that the equipment where EDITRAN is installed be on the internal network with a private IP and that the Internet connection be made through the EDITRAN/PX module developed as a gateway to add more security to TCP/IP communications on public networks. For more information on this component, consult its User Manual

## System installation

### Prerequisites

#### Onesait Editran software download

To download the software, access the EDITRAN customer portal: [Editran - Editran (onesait.com)](https://www.onesait.com/editran/).

In ***Resources > Unix > Software*** you will find links to the product software packages for the currently supported Operating Systems.

If you need help, you can contact the support team at:

* Support phone -- 91 480 80 80
* E-mail address - <editran@minsait.com>

#### Creating the editran user

Although not essential, it is recommended to create a new user account especially created to work with editran. For security, only this user should have the permissions to run and configure the system, assuming the role of product administrator.

### Installation procedure

* As user ***root***, create a main directory on a filesystem with enough space to serve as Editran's destination location. For example:

> \# mkdir /opt/editran
>
> Copy the downloaded installation file with extension **.tar.gz** into this directory. Review the software requirements section to calculate the disk space that your production environment may need.

*Note: In this document, \<home-editran> is sometimes used as a reference to refer to the chosen root installation directory, which by default is /opt/editran but can be changed to another one. If you choose a different one, you must replace any reference to the root directory /opt/editran with the one chosen.*

* Change the owner of the directory to user **editran**. For example:

> \# chown --R editran /opt/editran

* Log in with user **editran**, change to the installation directory and extract the software package files (in the example using the Linux package Editran-v5.2.1.x-x86\_64-redhat8.tar.gz):

> $ cd /opt/editran
>
> $ tar --zxvpf Editran-v5.2.1.x-x86\_64-redhat8.tar

* The downloaded software is structured according to the following directory tree:

```txt
\<home-editran>
      |-- bin
      |     |-- jar
      |     |-- lib
      |     |-- utils
      |     |-- SL
      |-- inst
      |-- cfg
      |-- log
      |-- tmp
```

* \<home-editran>: Created by the user as the root directory of the Editran software.
* *\<home-editran>*/**bin**: Programs that implement Editran functionality.
* *\<home-editran>*/bin/**jar**: Java libraries for the graphical utility for administering the DES key file.
* *\<home-editran>*/bin/**lib**: Libraries on which the editran programs depend, both their own and third-party libraries distributed with the product
* *\<home-editran>*/bin/**utils**: Scripts that serve as examples for installations where it is necessary to develop specific pre- and post-transmission procedures.
* \*\<home-\*editran>/bin/**SL**: License management service.
* *\<home-editran>*/**inst**: Scripts useful during the product installation process.
* *\<home-editran>*/**cfg**: It is created empty during installation and is where Editran will leave all its configuration files by default.
* *\<home-editran>*/**log**: In this directory Editran stores the system log files.
* *\<home-editran>*/**tmp**: It is created empty during installation. Editran uses it as a directory to store temporary files generated during transmissions: buffers, status, etc...
* Create DES key file (**ckds.des**). A new one can be generated as explained in appendix 9.1, or the one included in the installation can be copied:

```bash
cd <home-editran>/cfg
cp -p ckds.install ckds.des
```

* Size the cyclic log files used to monitor system activity. The size is given in number of stored messages; in the example 20,000:

> $ ./makelog --n 20000

* Create Editran startup script (**EDItran**). The one included in the installation should be copied with the name **EDItran.install**, then edited later if required with [the startup parameters](#parámetros-de-inicio):

```bash
cp -p EDItran.install EDItran
```

* Create License Service configuration file.

```bash
cp -p SL/App.conf.install SL/App.conf
```

* Before starting to operate with Editran, it is necessary to continue with the post-installation tasks. In addition, there is a minimum product configuration that must be done before starting the system.

### Post-installation tasks

#### Verify dependencies

The Editran installation includes the script *\<home-editran>***/inst/depends** in order to facilitate the system administrator's task of identifying and resolving the third-party library dependencies that the product has. The script relies on the commands that each OS provides for managing software packages (rpm, pkginfo, etc.).

The steps performed by the script are explained with examples of different results obtained.

* **Example 1**: A successful case on RHL9

```bash
#Dependencies:
-->OpenSSL v3
#Installed packages [rpm]:
openssl V3.5.5
openssl-devel V3.5.5
openssl-fips-provider V3.0.7
openssl-fips-provider-so V3.0.7
openssl-libs V3.5.5
xmlsec1-openssl V1.2.29
#Resolving libcrypto.so.3  Already resolved
	libcrypto.so.3 => /lib64/libcrypto.so.3 (0x00007f33c5a00000)
lrwxrwxrwx 1 root root 18 Apr 10 08:07 /lib64/libcrypto.so.3 -> libcrypto.so.3.5.5
```

* **Example 2**: OpenSSL is not installed as a Sw package but the administrator knows its location.

```bash
#Dependencies:
-->OpenSSL v3

#Installed packages [rpm]:
#Resolving libcrypto.so.3 ... not installed
```

Assuming that the library is in **/usr/lib**, the following link would be created:

```bash
cd \<home-editran>/bin/lib
ln -s /usr/lib/libcrypto.so.3.5.5 libcrypto.so.3
```

#### Terms of use

To be able to use Editran, it is necessary to have a valid license issued by **Indra**. Licensing is done per machine, so the license is associated with the specific server on which the system will be started.

To request it, follow these steps:

* Run the machine identifier generation script:

  ```bash
  cd \<home-editran>/bin
  ./licencia.sh
  ```
* Send to <editran@minsait.com> the file **hostid\_dd-mm-yyyy.txt** generated by the script. If you have a previous license, also attach the file **licencia.dat** from that installation.
* When you receive the new license by email, copy the attached file into the directory **bin/SL** and rename it as **licencia.dat**.
* Protect that file to avoid accidental modifications, since Editran stops working if the license is invalid or altered.

## Initial system configuration

Once EDITRAN is installed, it is necessary to perform a series of tasks in order to configure the system so that all its components can run properly.

This section describes only the minimum configuration necessary for the system to start; the user manuals for the Editran/P and Editran/G components explain in detail how profiles for transmissions are created.

### License Server configuration settings

At this stage the license service configuration must be reviewed. At a minimum, the parameter **BASE** must be adjusted and, optionally, the listening ports can also be customized.

These parameters are configured in `<home-editran>/bin/SL/App.conf`:

* **BASE** (required)

  Defines the root directory associated with the service, where its working files (logs, reports, temporary files, etc.) are generated.

  It can be explicitly set with the path of the SL folder. However, unless specifically needed, **it is recommended to leave the line commented out** so that the service uses the product's default path.

  Example adjusting the path with the appropriate directory:

  ```txt
  # BASE Dir of the Application
  BASE: /opt/bin/SL
  ```

  Example commenting out the line:

  ```txt
  # BASE Dir of the Application
  # BASE: <home-editran>/bin/SL
  ```
* **SL.PORTSRV** (optional)

  Allows changing the license server port (default value: **50777**).

  ```txt
  # SL (License Server)
  #-------------------------
  SL.PORTSRV: 50777
  ```

  If modified, it must match the port defined in the variable **LICSRV** of [the startup parameters](#parámetros-de-inicio). Do not use ports reserved by Editran.
* **FC.PORTSRV** (optional, only if the license includes billing)

  Allows changing the billing server port (default value: **50778**).

  ```txt
  # FC (Billing Server)
  #---------------------------
  # Day of the month the report is generated
  #DIAINF: 1
  FC.PORTSRV: 50788
  ```

  If modified, it must match the port defined in the variable **FACTSRV** of [the startup parameters](#parámetros-de-inicio). Do not use ports reserved by Editran.
* **DIAINF** (optional, only if the license includes billing)

  Indicates the day of the month on which the billing report is generated. By default, it is generated on day 1; uncomment it only if you want another value.

  ```txt
  # FC (Billing Server)
  #---------------------------
  # Day of the month the report is generated
  DIAINF: 2
  ```

### Local environment

For EDITRAN to run, the following parameters must be set:

* **Entity code**: Indra assigns a unique code that identifies each entity/organization in the EDITRAN logical network.
* **Service IP and port**: Server IP address and TCP port open for listening to remote connections.

In the EDITRAN/P user manual \[Ref. 1-2] you can see how to perform this task from the user interface. If the system is started without it being defined, in the file **log/editranp.out** the following error message appears:

`10/11/2017 14:43:55.728 \[xinitenv.c] Local environment profile does not exist`

## Startup parameters

There are other properties that affect EDITRAN behavior that can be parameterized to set the runtime environment when starting the System. The way to do this is to uncomment and assign values to the environment variables in the script **EDItran**.

### editran environment variables

| **Variable**        | **Description**                                                                                                                                                                                                                                                                                 | Allowed values                                         | Default Value   |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | --------------- |
| EDI\_IPC\_KEY\_BASE | TCP port range used for communication between Editran processes. It will be necessary to define it if it matches ports already in use by other applications.                                                                                                                                    |                                                        | 8000            |
| EDI\_DATA           | Directory for Editran data files: configuration and temporary files (buffers, status, etc.). In this version there is the possibility of detaching them from the product installation path by defining the path where the processes search for and store those files.                           | Existing path with permissions                         | home-editran    |
| EDI\_TOUT\_IDLE     | The variable sets the protocol idle timeout. Any session connected but with no data traffic will be released when that time elapses.                                                                                                                                                            |                                                        | 600 (seconds)   |
| EDI\_DBGL           | Determines the level of log information recorded during transmissions.                                                                                                                                                                                                                          | 2 (trace) and 3 (debug)                                | info            |
| EDI\_MGLOG          | Determines whether log information is recorded in a single file or in separate files for each *Presentation*. Those files are stored in \<home-editran>/log.                                                                                                                                    | If the variable does not exist, the log file is unique | single file     |
| EDI\_GUPGRADE       | The parameters that Editran passes to the previous and subsequent user programs have changed in this version. It is recommended that they be adapted during the migration process, but if that is not possible, it can be used in mode compatible with lower versions by setting this variable. | If the variable exists, compatible mode is enabled     | standard mode   |
| EDI\_REPORT\_PATH   | Generation of daily reports of transmitted files. More details about this functionality in *Editran/G User Manual*.                                                                                                                                                                             |                                                        |                 |
| EDI\_REPORT\_LEVEL  | Level of detail in the generation of file reports.                                                                                                                                                                                                                                              | 0(basic), 1(extended)                                  | basic           |
| EDI\_SHARE\_FF      | Integration with the signature service (Editran/FF). More details about this functionality in *Editran/G User Manual*.                                                                                                                                                                          |                                                        |                 |
| LICSRV              | Variable to configure the IP and listening port of the license server. The port must have the same value as the SL.PORTSRV variable defined in point [License Service](#servicio-de-licencia)                                                                                                   |                                                        | 127.0.0.1:50777 |
| EDI\_DELAY\_LIC     | Variable to configure the waiting time after starting the license service.                                                                                                                                                                                                                      | Number of delay seconds                                | 2 seconds       |

Likewise, the reference to the process **edifilesrv** should be removed from the startup/shutdown lists (PROC\_STAR and PROC\_STOP variables) when the client does not have the "*FEATURE **distributed***" licensed. Otherwise, when the application starts, the corresponding error will appear and, although **it does not affect** operation, it may create uncertainty.

It is up to the Editran administrator to leave the default lists, knowing that that error message can be ignored, but later some operator unfamiliar with this circumstance may interpret it as an incident.

### Concurrent Editran instances

If you need to have several instances of Editran on the same machine, configure each one as an independent environment.

#### What must be different in each instance

| Item                     | Requirement                                      |
| ------------------------ | ------------------------------------------------ |
| Editran application user | A different user per instance.                   |
| Installation directory   | A different directory per instance.              |
| EDI\_IPC\_KEY\_BASE      | A different value per instance.                  |
| License ports            | A different value per instance.                  |
| Editran TCP resources    | Distinct IP and/or listening ports per instance. |

#### Configuration steps (per instance)

1. Install Editran with a user and a directory exclusive to that instance.
2. Edit the script **EDItran** and define own values for:

   ```txt
   EDI_IPC_KEY_BASE=<unique_value>
   LICSRV=127.0.0.1:<licensePort>
   # Configure FACTSRV only if the license has billing
   FACTSRV=127.0.0.1:<billingPort>
   ```
3. Add those same variables with the same values in the user profile that starts the instance.
4. In **SL/App.conf**, configure the ports:

   ```txt
   SL.PORTSRV: <licensePort>
   # Configure FC.PORTSRV only if the license has billing
   FC.PORTSRV: <billingPort>
   ```

   `SL.PORTSRV` must match exactly the port configured in `LICSRV`.\
   `FC.PORTSRV` must match exactly the port configured in `FACTSRV`.
5. Verify that the TCP resources (IP/ports) of that instance do not overlap with those of other instances.

> **Expected result:** each instance can start and operate in parallel without port conflicts or shared-resource conflicts.

## Start and stop the system

### EDItran script

In Unix environments, to start and stop the system the script **EDItran**is executed. Its syntax is:

```bash
Usage: EDItran [-l] [-t] [-f] start|stop|status|version
-l Operation restricted to the License Server
-t Trace
-f Ignore another EDITRAN already started
start Starts the service
stop Stops the service
status Gets the service status
version Displays the version of the EDITRAN system
```

When starting Editran, the following options are supported:

* **-l** This option restricts the scope of the command to the license server only.
* **-t** Enables tracing. Editran processes leave additional information that allows error situations to be debugged. The trace is written to the process's standard error output, which is redirected to a file named after the process that generates it and with extension **.out**. This information will normally be required by the Editran Support group to analyze incidents.

> Since version 5.0.2, there is also the possibility of enabling tracing temporarily without having to stop and start Editran. This is done by sending the SIGUSR2 signal to the process that needs to be analyzed. For example, if it were ***editranp***, the user who started the system must follow these steps:

* Obtain the process pid

```bash
ps -ef | grep editranp
usredi 1143 1 0 Sep 29 ? 72:40 editranp
```

* Activate tracing by sending the signal to the process with the command ***kill*** \[^1]

```bash
/usr/bin/kill -USR2 1143
```

* Once the test to be analyzed has been performed, disable tracing by running again:

```bash
/usr/bin/kill -USR2 1143
```

In the file **log/editranp.out** these actions are reflected with the following messages:

```
10/11/2017 15:40:14.094 [LOG][SIG17]:Trace On
10/11/2017 15:50:18.615 [LOG][SIG17]:Trace Off
```

* **-f** If this option is specified, when doing **start** it is allowed to start Editran even if another instance is already started. For several systems to work simultaneously correctly, the installation must have been performed with the requirements detailed in section [Concurrent Editran instances](#instancias-editran-concurrentes).

### editran.service service in Linux Red Hat

It is possible to start and stop Editran as a service. To do so, you must configure the service unit provided in the product installation by following these steps:

* Modify the file /opt/editran/bin/service/editran.service

```txt
[Unit]
Description=Editran
After=network.target

[Service]
Type=forking
User=editran
WorkingDirectory=/opt/editran/bin
Environment=JAVA_HOME=/path/to/java
ExecStart=/opt/editran/bin/EDItran -s start
ExecStop=/opt/editran/bin/EDItran -s stop

[Install]
WantedBy=multi-user.target
```

* In the User section, you must define the user that will start the service.
* In WorkingDirectory, ExecStart and ExecStop, you must define the Editran installation path.
* In the /path/to/java path, the java installation path must be defined.
* Authenticated as **root**, in **/etc/systemd/system/** \*/ the editran.service link file must be created pointing to /opt/editran/bin/service/editran.service (unless the Editran installation is on a mount point; in that case, a copy of /opt/editran/bin/service/editran.service must be created in /etc/systemd/system)
* Next, the systemd manager configuration must be reloaded: `systemctl daemon-reload`
* If desired, the service can be configured to start automatically when the system boots: `systemctl enable editran.service`

Depending on the particular dependencies of your system, you may need to adapt the editran.service file for this option to work correctly.

* The commands supported by the service are:
* systemctl status editran.service
* systemctl start editran.service
* systemctl stop editran.service
* systemctl restart editran.service

> **Note:** Before starting the service, you must have a valid license and a defined local environment.

## Version update

### Source version 5.2.1.x without OS change

Once the package for the new Editran version has been downloaded, you must perform the following steps:

* Stop Editran.
* Make a backup of the Editran directory. For example:

```bash
cp -r /opt/editran /opt/editran.v521x
```

* Extract the files from the software package appropriate for your operating system (RHEL8 or RHEL9) into the Editran installation directory. For example:

```bash
cd /opt/editran
tar --zxvpf Editran-v5.2.1.x-x86_64-redhatx.tar
```

* Create the Editran startup script (**EDItran**). You must copy the one included in the installation with the name **EDItran.install** and rename the one from the old installation. For example:

```bash
mv EDItran EDItran.v521x
cp -p EDItran.install EDItran
```

> Then edit this script if you want to include any of the options described in section 5.3

* It is not necessary to request a new license; the license file from the source version is compatible with the new updated version.

### Source version 5.2.0 or earlier without OS change

Once the package for the new Editran version has been downloaded, you must perform the following steps:

* Stop Editran.
* Rename the Editran installation directory. For example: `mv /opt/editran /opt/editran.v510`
* Install the product.
* Request a new license.
* Migrate the configuration from the previous version. To do this, you have the utility **migra-cfg**. The directory *\<home-editran>***/inst** contains the scripts (**.bash** and **.sh**, depending on our *shell*) that perform the task.

  Check that the EDITRAN\_HOME variable in the script you use has the value appropriate for the client's installation.
* The script **migra-cfg.sh** performs three different steps, and if any of them fails, after fixing the error, it can be run again using the option **-c** specifying the desired step `cfg2txt | txt2cfg | migragc`
* If neither the old nor the new installation has EDI\_DATA defined (directory for EDITRAN data files), proceed as follows:
* Go to *\<home-editran>***/bin** and run:

```bash
../inst/migra-cfg.sh
```

* The script reports the steps being carried out, asking for the user's response when additional data or confirmation is needed. In summary, the actions performed by the script and the messages shown to the user are:
* The user is prompted for the path and version to migrate:
  * Enter the version to migrate (e.g. 50): 51
  * Version: 51
  * Enter the release to migrate (e.g. 2): 0
  * Release: 0
  * Enter the path of the version to migrate: /opt/editran.v510
  * Path: /opt/editran.v510
* The configuration is copied to the newly created directory *\<home-editran>***/migration**
  * Copy configuration V51 R0 \[OK]
* The migration of Editran profile files is done in two steps: first they are converted to text, and then the new version files are created from them.
  * Dump EDITRAN/P profiles to text `/opt/editran/migration/perfilesP.txt`
  * Dump EDITRAN/G profiles to text `/opt/editran/migration/perfilesG.txt`
  * Configuring EDITRAN/P `/opt/editran/migration/perfilesP.txt`
  * Configuring EDITRAN/G `/opt/editran/migration/perfilesG.txt`
* Finally, the EDITRAN/GC module keys are migrated. Depending on the original configuration, the following messages will be shown:
* If EDITRAN/GC was not used
  * editran/GC: /opt/editran.v510/controlGC.cfg does not exist
* If RSA keys exist but no EDITRAN/GC module
  * RSA: the keys /opt/editran.v510/ckds.rsa must be migrated manually
* The result of the key migration is shown (OK or ERROR):
  * Migrate EDITRAN/GC \[OK]
* If error messages appear during this process, you should contact Editran Technical Support and send the contents of the directory *\<home-editran>***/migration** so that those messages can be assessed.
* If the old or the new installation has EDI\_DATA defined:

> The following table shows the migration folder that the migration script will use and how the EDI\_DATA variable should be configured in the new installation:

| Old version       | New version       | New EDI\_DATA configuration and migration folder         |
| ----------------- | ----------------- | -------------------------------------------------------- |
| EDI\_DATA         | EDI\_DATA         | <p>EDI\_DATA=$EDI\_DATA old<br>folder=$EDI\_DATA old</p> |
|                   | Without EDI\_DATA | <p>Without EDI\_DATA<br>folder=$EDI\_DATA old</p>        |
| Without EDI\_DATA | EDI\_DATA         | <p>EDI\_DATA=$EDI\_DATA new<br>folder=$EDI\_DATA new</p> |

The migration folder must contain the components indicated in the following table; if any are missing, they must be copied from the old Editran installation:

| Old version          | Migration folder contents |
| -------------------- | ------------------------- |
| **Earlier than 520** | folder/editranp.cfg       |
|                      | folder/editrang.cfg       |
|                      | folder/controlGC.cfg      |
|                      | folder/.rsa               |
|                      | folder/ckds.des           |
| **520**              | folder/cfg/editranp.cfg   |
|                      | folder/cfg/editrang.cfg   |
|                      | folder/cfg/controlGC.cfg  |
|                      | folder/cfg/.rsa           |
|                      | folder/bin/ckds.des       |
| **521x**             | folder/cfg/editranp.cfg   |
|                      | folder/cfg/editrang.cfg   |
|                      | folder/cfg/controlGC.cfg  |
|                      | folder/cfg/.rsa           |
|                      | folder/cfg/ckds.des       |

Where

* **editranp.cfg** and **editrang.cfg** are the profile files.
* Key file **ckds.des**
* Key file **ckds.rsa** (if it existed in the previous installation and only if it has an RSA license)
* **controlGC.cfg** (if it existed in the previous installation and only if it has an RSA license)
* Directory **.rsa** (if it existed in the previous installation and only if it has an RSA license)

> At this point you can already be in *\<home-editran>***/bin** and run:

* $**../inst/migra-cfg.\[ba]sh**
* The script reports the steps being carried out, asking for the user's response when additional data or confirmation is needed. In summary, the actions performed by the script and the messages shown to the user are:
* The user is prompted for the path and version to migrate:
  * Enter the version to migrate (e.g. 50): 51
  * Version: 51
  * Enter the release to migrate (e.g. 2): 0
  * Release: 0
  * EDI\_DATA detected
  * Path: /opt/editran/share
* The configuration is copied to the newly created directory *\<home-editran>***/migration**
  * Copy configuration V51 R0 \[OK]
* The migration of Editran profile files is done in two steps: first they are converted to text, and then the new version files are created from them.
  * Dump EDITRAN/P profiles to text \[/opt/editran/migration/perfilesP.txt]\[OK]
  * Dump EDITRAN/G profiles to text \[/opt/editran/migration/perfilesG.txt]\[OK]
  * Configuring EDITRAN/P \[/opt/editran/migration/perfilesP.txt] \[OK]
  * Configuring EDITRAN/G \[/opt/editran/migration/perfilesG.txt] \[OK]
* Finally, the EDITRAN/GC module keys are migrated. Depending on the original configuration, the following messages will be shown:
* If EDITRAN/GC was not used
  * editran/GC: /opt/editran/share/controlGC.cfg does not exist
* If RSA keys exist but no EDITRAN/GC module
  * RSA: the keys /opt/editran/share/ckds.rsa must be migrated manually
* The result of the key migration is shown (OK or ERROR):
  * Migrate EDITRAN/GC \[OK]
* If error messages appear during this process, you should contact Editran Technical Support and send the contents of the \<home-editran>/migration directory so that those messages can be assessed.
* If the new installation has EDI\_DATA, the migration script will leave a new folder configured and will propose it as the new EDI\_DATA.
  * A new directory /opt/editran/share\_FROM\_510 has been created to be used as EDI\_DATA. Please reconfigure your installation.

### Migration between different operating systems

Once the package for the new Editran version has been downloaded, you must perform the following steps:

* Install the product.
* Request a new license.
* Export the profiles to plain text on the original OS. Run the commands while respecting the txt file names that appear in them:

> $ ediperfi -r -a -operfilesP.txt
>
> $ igaperfi -r -a -operfilesG.txt

* Create the directory in the new installation *\<home-editran>***/migration**
* If the new installation has EDI\_DATA, that directory will be chosen by the migration script as the source folder for the files. Otherwise, a new folder must be created inside the directory *\<home-editran>***/migration**
* The files from the old version must be copied into the directory from the previous point following the structure in the table:

| Old version      | Migration folder contents                                                              |
| ---------------- | -------------------------------------------------------------------------------------- |
| Earlier than 520 | <p>perfilesP.txt<br>perfilesG.txt controlGC.cfg<br>.rsa<br>ckds.des<br>ckds.rsa</p>    |
| 520              | <p>perfilesP.txt<br>perfilesG.txt<br>cfg/controlGC.cfg<br>cfg/.rsa<br>bin/ckds.des</p> |
| 521              | <p>perfilesP.txt<br>perfilesG.txt<br>cfg/controlGC.cfg<br>cfg/.rsa<br>cfg/ckds.des</p> |

Where

* **perfilesP.txt** and **perfilesG.txt** are the files generated in the first step.
* Key file **ckds.des**
* Key file **ckds.rsa** (if it existed in the previous installation and only if it has an RSA license)
* **controlGC.cfg** (if it existed in the previous installation and only if it has an RSA license)
* Directory **.rsa** (if it existed in the previous installation and only if it has an RSA license)

  .
* Go to *\<home-editran>***/bin** and run the migration utility, specifying as an argument the step to perform: recover configuration from text. If the source OS is Windows, the option **--w**.

> $ ../inst/migra-cfg.\[ba]sh \[-w] txt2cfg
>
> In this case, the actions and messages shown to the user by the migration utility are:

* The user is prompted for the version to migrate:
  * Enter the version to migrate (e.g. 50): 51
  * Version: 51
  * Enter the release to migrate (e.g. 2): 0
  * Release: 0
* If there is no EDI\_DATA in the new installation, the user will be asked for the full path of the migration folder
  * Enter the path of the version to migrate: /opt/editran/migration/v510
  * Path: /opt/editran/migration/v510
* If EDI\_DATA exists, the message will be shown:
  * EDI\_DATA detected
  * Path: /opt/editran/share
* Migration of profile files from the text files.
  * Configuring EDITRAN/P \[/opt/editran/migration/v510/perfilesP.txt] \[OK]
  * Configuring EDITRAN/G \[/opt/editran/migration/v510/perfilesG.txt] \[OK]
* Finally, the EDITRAN/GC module keys are migrated. Depending on the original configuration, the following messages will be shown:
* If EDITRAN/GC was not used
  * editran/GC: /opt/editran/migration/v510/controlGC.cfg does not exist
* If RSA keys exist but no EDITRAN/GC module
  * RSA: the keys /opt/editran/migration/v510/ckds.rsa must be migrated manually
* The result of the key migration is shown (OK or ERROR):
  * Migrate EDITRAN/GC \[OK]
* If error messages appear during this process, you should contact Editran Technical Support and send the contents of the \<home-editran>/migration directory so that those messages can be assessed.
* If the new installation has EDI\_DATA, the migration script will leave a new folder configured and will propose it as the new EDI\_DATA.

> A new directory /opt/editran/share\_FROM\_510 has been created to be used as EDI\_DATA. Please reconfigure your installation

* The OS change may involve other changes (modification of the paths used in the configuration, adaptation of scripts used as user procedures, etc.) that are outside this migration.

## User script migration

Once the update from a version earlier than 5.2.1.x has been completed, if there are specific scripts that run as pre- and post-transmission procedures, you must adapt them taking into account that the call parameters undergo the minimal modifications indicated below:

* In the pre-transmission programs the parameter list is: presentation, direction, local code, remote code and application.
* In the post-transmission programs the parameter list is: presentation, direction, local code, remote code, application and the absolute path of the file with the list of sent or received files.
* Post programs are only run when the transmission completes successfully. In any other case, including errors in the upload and download process, the exception program will be executed.
* For this new version, it is recommended that these scripts be left in *\<home-editran>***/bin/utils** to distinguish them from the product software.

However, there is the possibility of indicating, through a variable in the script **EDItran**, that scripts from previous versions will be used (by uncommenting EDI\_GUPGRADE).

## Appendices

### Installation and change of the HMK master key

The Master key guarantees the integrity of the Auxiliary keys stored in the file of **ckds.des**, since all the keys residing in the file are stored encrypted with that HMK.

The command that performs this service is **pinsdes**. Its syntax is shown below:

> pinsdes \<current\_key> \<new\_key>

Meaning:

> \<current\_key>: installed Master key
>
> \<new\_key>: new Master key

The above command, when used in the Master key installation process, is invoked with \<current\_key> = \<new\_key>, that is, the user specifies the Master key and repeats it. The command will validate that both keys are the same.

If **pinsdes** is used to change the installed Master key, the user must specify in \<current\_key> the Master key installed in the file **ckds.des** existing and in \<new\_key> the new Master key. The validations performed in this case are, on the one hand, knowledge of the current Master key ---specified as the first argument of the command--- and, on the other hand, that the new Master key ---specified second--- is different from the current one.

In both cases, it will also be validated that the format of the Master key to be installed has odd parity; that is, each octet (two characters from the hexadecimal alphabet) of the new Master key must have an odd number of bits with value 1.

During the Master key change process, it is advisable to make a backup of it. Thus, if an error occurs during the process, there is the possibility of restoring the original key file.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.editran.onesait.com/documentacion-editran/open-v5.2.1-en/linux/instalacion.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
