> 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.3-en/linux/instalacion.md).

# Installation

This document provides the installation manual for the Editran System.

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

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

The manual is intended for system administrators, and it is assumed that the reader has the technical knowledge required to carry out the tasks described in it.

## Prerequisites

### Hardware requirements

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

#### Processor

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

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

#### HDD space

The required disk space depends largely on the maximum size of the transmitted files and the time they remain 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 occupies about 35 KB. The total number of transmissions to be configured will depend both on the number of entities we need to communicate with and on the types of information exchanged. Therefore, for a medium installation (250 different profiles), about 10 MB should be considered.
* Space for temporary files created by Editran during transmissions. For each transmission, disk space for three times the volume of transferred data will be required. The table gives a recommended sizing according to 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 infrastructure level, for installations with these needs, a virtualization solution is recommended. The implications this would have on the product:

* For this solution to provide scalability capabilities, it would need to be associated with the installation of multiple isolated Editran instances, each managing its own 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://780925830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiQfLim2uDaLOZRkgWkOk%2Fuploads%2Fgit-blob-da2fd5fca3544945d93d3783b4bbfb8a41f48e4e%2Fimage1.png?alt=media)

### Software requirements

#### Operating Systems

In Unix environments, installers are distributed for the operating systems and architectures in the table. The installers are generated and tested on the stated versions of each OS; nevertheless, they are usually compatible with later versions.

#### Installers

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

#### Additional software

* The host system must have a ***Java virtual machine*** version **21**.
* On systems **Red Hat Enterprise Linux 8 (RHEL 8)** you must have **OpenSSL version 1.1.1** installed.
* On systems **Red Hat Enterprise Linux 9 (RHEL 9)** the version of **OpenSSL 3.5** provided by the operating system itself with all security updates applied.

> ℹ️*Note:* Editran only depends on the **libcrypto** library from OpenSSL, which provides the symmetric and public-key encryption algorithms used in its cryptography.

### Connectivity

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

> ℹ️*Note:* It is recommended that the machine where Editran is installed be on the internal network with a private IP and that the Internet connection be made through the module **Editran/PX** developed as a gateway to add more security to TCP/IP communications on public networks. For more information about this component, see its user manual.

## System installation

### Preliminary tasks

#### Onesait Editran software download

To download the software, go to the official product page [Editran](https://www.onesait.com/editran/resources).

In ***Resources > Unix > Software*** you will find links to the product software installers for the currently supported operating systems.

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

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

#### Creating the editran user

Although it is not essential, it is recommended to create a new user account specifically for working with editran. For security reasons, only this user should have permission to run and configure the system, assuming the role of product administrator.

### Installation procedure

As user ***root***, create a top-level directory on a file system with enough space to serve as the destination location for Editran. For example:

`mkdir /opt/editran`

Copy the downloaded installation file with the extension **.run** into this directory. Review the software requirements section to calculate the disk space that may be needed for your production environment.

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

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

`chown -R editran /opt/editran`

Log in with user **editran**, go to the installation directory and run the installer (in the example Editran-v5.3.x-x86\_64-redhat9.run):

```bash
cd /opt/editran

./Editran-v5.3.x-x86_64-redhat9.run
```

The installation steps are detailed below with screenshots of the installer run in text mode (console). On servers with a graphical interface, the installer will display windows equivalent to the screens described in this section, keeping the same flow, options, and values presented in text mode.

#### Installation directory

The installer asks for the directory created in the previous step to copy the product files into it.

You can enter a path or press **Enter** to accept the default proposed path.

![installation directory](https://780925830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiQfLim2uDaLOZRkgWkOk%2Fuploads%2Fgit-blob-cdd664e1f52b2ebbe5502b2f15aabfb07e8e3105%2F01_instalacion_linux_ruta.png?alt=media)

#### Configuration data directory

By default, **Editran** stores the configuration files and temporary files in the installation directory.

If you want to use a different path, enable the custom directory option when the installer displays the following prompt:

`Custom configuration data directory [y/N]:`

* **Y/y**: enables custom configuration and lets you specify the data directory path.
* **N/n** or **Enter**: keeps the default path (installation directory).

Example of selecting a custom data directory:

![data](https://780925830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiQfLim2uDaLOZRkgWkOk%2Fuploads%2Fgit-blob-06043e091d1b784a79aa033281a21acb2b346cf6%2F02_instalacion_linux_dir_datos.png?alt=media)

#### Summary and installation

Once the above options are completed, the installer shows a summary with the selected values.

After confirmation, it copies the files and completes the installation process.

![summary](https://780925830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiQfLim2uDaLOZRkgWkOk%2Fuploads%2Fgit-blob-87f89442c01e05809ad7aec10a97af9cf824f6a2%2F03_instalacion_linux_fin.png?alt=media)

The installed software is structured according to the following directory tree:

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

| Path                            | Description                                                                                                                                       |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| *\<home-editran>*               | Editran software root directory.                                                                                                                  |
| *\<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** | Key exchange management scripts and template scripts for installations that need to develop specific pre- and post-transmission procedures.       |
| *\<home-editran>*/bin/**SL**    | License management service.                                                                                                                       |
| *\<home-editran>*/**inst**      | Useful scripts during the product installation process.                                                                                           |
| *\<home-editran>*/**cfg**       | Directory where the configuration files of **Editran**.                                                                                           |
| *\<home-editran>*/**log**       | Editran leaves the system log files in this directory.                                                                                            |
| *\<home-editran>*/**tmp**       | Created empty during installation. Editran uses it as a directory to store temporary files generated during transmissions: buffers, state, etc... |

> ℹ️*Note:* If a custom directory for configuration data was selected during installation, the folders `tmp` and `cfg` will be located in that directory instead of being inside `<home-editran>`.

### Post-installation tasks

#### Verify dependencies

The Editran installation includes the script *\<home-editran>***/inst/depends** to check whether the system has the external libraries required by the product installed.

Two representative examples are shown below.

* **Example 1**: A successful case in 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 (0x00007fd6f0400000)
  lrwxrwxrwx 1 root root 18 Apr 10 08:07 /lib64/libcrypto.so.3 -> libcrypto.so.3.5.5
  ```

  This message confirms that Editran has located `libcrypto.so.3` and that it can use it without any additional steps.
* **Example 2**: OpenSSL is not installed as Sw package:

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

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

  In this case, the script has not been able to locate the library and the dependency remains unresolved. The administrator must manually create the symbolic link so that Editran can find it:

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

  If the library is not installed on the system, the corresponding OpenSSL package must first be installed. Once installed, the script can be run again to check it once more.

#### License of use

To be able to use Editran, you must 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 **bin/SL** directory and rename it as **licencia.dat**.
* Protect that file to prevent accidental changes, since Editran stops working if the license is invalid or altered.

## Initial system configuration

Once Editran is installed, a series of tasks must be performed in order to configure the system so that all its components can run properly.

This section describes only the minimum configuration needed 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.

### Startup parameters

Editran is already prepared to work with the default values of the startup parameters. You only need to modify these parameters to customize the runtime environment in installations that require it; to do so, uncomment and assign a value only to the environment variables in the script **EDItran** that you need to adjust from their default value.

Some variables must also be defined in the **user profile** of the Editran administrator (shell profile, for example `~/.bashrc` in bash) **only if they are uncommented in the EDItran script and assigned a value different from the default value**. In that case, keep the same value in both locations so that utilities such as **menup**, **menug** and other commands apply the same configuration.

#### Editran environment variables

| **Variable**              | **Description**                                                                                                                                                                                                                                                                        | Allowed values                                         | Default value        | Define in profile (if non-default value) |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | -------------------- | ---------------------------------------- |
| EDI\_IPC\_KEY\_BASE       | Range of TCP ports used for communication between Editran processes. It must be defined if they coincide with ports already in use by other applications.                                                                                                                              |                                                        | 8000                 | Yes                                      |
| EDI\_DATA                 | Custom directory for Editran data files: configuration and temporary files (buffers, state, etc.). In this version, it is possible to separate them from the product installation path by defining the path where processes look for and save those files.                             | Existing path with permissions                         | home-editran         | Yes                                      |
| EDI\_TOUT\_IDLE           | This variable sets the protocol inactivity timeout. Any connected session with no data traffic will be released once that time has elapsed.                                                                                                                                            |                                                        | 600 seconds          | No                                       |
| EDI\_DBGL                 | Determines the level of log information recorded during transmissions.                                                                                                                                                                                                                 | <p>1(info)<br>2(trace)<br>3(debug)</p>                 | info                 | No                                       |
| EDI\_MGLOG                | Determines whether the log information is recorded in a single file or in different files for each *Presentation*. These files are stored in \<home-editran>/log.                                                                                                                      | If the variable does not exist, the log file is unique | single file          | No                                       |
| EDI\_GUPGRADE             | The parameters that Editran passes to the pre- and post-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 run in a mode compatible with lower versions by setting this variable. | If the variable exists, compatible mode is enabled     | standard mode        | Yes                                      |
| EDI\_REPORT\_PATH         | Generation of daily reports of transmitted files. More detail about this functionality in *Editran/G User Manual*.                                                                                                                                                                     |                                                        |                      | No                                       |
| EDI\_REPORT\_LEVEL        | Level of detail in file report generation.                                                                                                                                                                                                                                             | <p>0(basic)<br>1(extended)</p>                         | basic                | No                                       |
| EDI\_SHARE\_FF            | Integration with the signing service (Editran/FF). More detail about this functionality in *Editran/G User Manual*.                                                                                                                                                                    |                                                        |                      | No                                       |
| 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 the point [License Service](#servicio-de-licencia)                                                                                      |                                                        | 127.0.0.1:50777      | Yes                                      |
| FACTSRV                   | Variable to configure the IP and listening port of the billing server. The port must have the same value as the FC.PORTSRV variable defined in the point [License Service](#servicio-de-licencia)                                                                                      |                                                        | 127.0.0.1:50778      | Yes                                      |
| EDI\_DELAY\_LIC           | Variable to configure the wait time after starting the license service.                                                                                                                                                                                                                | Number of delay seconds                                | 2 seconds            | No                                       |
| EDI\_DISABLE\_LOG\_BACKUP | Variable that disables log file backup at Editran startup.                                                                                                                                                                                                                             | <p>0(log backup active)<br>1(log backup inactive)</p>  | 0(log backup active) | No                                       |

### License Server configuration settings

No adjustment is necessary in the license server configuration unless you want to set listening ports different from those used by default by the server.

The configurable parameters are located in `<home-editran>/bin/SL/App.conf` and are as follows:

* **BASE**

  The installer already sets this parameter with the path `<home-editran>/bin/SL`. It is the root directory of the license service and its logs, reports, temporary files, etc. will be generated there.

  ```txt
  # BASE directory of the application
  BASE: /opt/editran/bin/SL
  ```
* **SL.PORTSRV** (optional)

  Include it if you want to use a license port different from the default one (**50777**).

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

  If customized, the port must match the variable **LICSRV** defined in [the startup parameters](#parámetros-de-inicio). Reserved ports for Editran must not be used.
* **FC.PORTSRV** (optional, only if the license has billing)

  Include it if you want to use a billing port different from the default one (**50778**).

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

  If customized, the port must match the variable **FACTSRV** defined in [the startup parameters](#parámetros-de-inicio). Reserved ports for Editran must not be used.
* **DIAINF** (optional, only if the license has billing)

  It is used to choose the day on which the billing results report is generated. By default it is the first day of the month; only uncomment it if you want another day.

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

### Local environment

Once you have a license file in `<home-editran>/bin/SL`, for Editran to run, it is essential to define a **Local environment**.

Parameters to configure:

* **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 open TCP port for listening to remote connections.

In the user manual for [Editran/P](/documentacion-editran/open-v5.3-en/linux/plataforma.md) you can see how to perform this task from the user interface. If the system is started without it being defined, the following file `<home-editran>/log/editranp.out` will record the following error message:

```txt
10/11/2025 14:43:55.728 [xinitenv.c] The local environment profile does not exist
```

### Concurrent Editran instances

If you need to have several Editran instances 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    | IP and/or listening ports differentiated by 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 specific values for:

   ```txt
   EDI_IPC_KEY_BASE=<unique_value>
   LICSRV=127.0.0.1:<licensePort>
   # Configure FACTSRV only if the license includes 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 includes 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.

## Starting and stopping 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 EDITRAN system version
```

When starting Editran, the following options are allowed:

* **-l** This option restricts the scope of the command to the license server only.
* **-t** Enables trace. Editran processes leave additional information that makes it possible to debug error situations. The trace is written to the standard error output of the process, 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.

  Starting with version 5.0.2, it is also possible to enable 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:

  * Get 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**

    ```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]:Tracing On
    10/11/2017 15:50:18.615 [LOG][SIG17]:Tracing Off
    ```
* **-f** If this option is specified, when doing **start** starting Editran is allowed even if another instance is already running. For several systems to be able to run simultaneously correctly, the installation must have been performed with the requirements detailed in the 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 this, 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 /path/to/java, you must define the Java installation path.
* Authenticated as **root**, in the path **/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)
* Then the systemd administrator configuration must be reloaded: `systemctl daemon-reload`
* If you wish, the service can be configured to start automatically when the system boots: `systemctl enable editran.service`

Depending on the specific 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.3.x with no OS change

Once the installer for the new version has been downloaded, the update is performed on the existing installation.

Previous steps:

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

  ```bash
  cp -r /opt/editran /opt/editran.v53x
  ```
* Run the installer corresponding to your operating system (RHEL8 or RHEL9). For example:

  ```bash
  cd /opt/editran
  ./Editran-v5.3.x-x86_64-redhatx.run
  ```

Below are the installer screens in text mode (console). On servers with a graphical interface, the wizard will show equivalent windows with the same sequence of options.

#### 1) Update directory

The installer asks for the directory where the product files will be copied.

You must specify the path of the existing installation so that the installer correctly detects that this is an update.

![installation directory](https://780925830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiQfLim2uDaLOZRkgWkOk%2Fuploads%2Fgit-blob-f49644974219cbf6a6c07c41793b74a441c1b077%2F04_actualizacion_linux_ruta.png?alt=media)

#### 2) Configuration data directory

If a custom data path was used in the previous installation, enable the custom directory option when the installer shows the following prompt:

`Custom configuration data directory [y/N]:`

* **Y/y**: enables custom configuration and lets you specify the data directory path.
* **N/n** or **Enter**: keeps the default path (installation directory).

In case you select **Y**, enter the same data path used by the previous installation:

![data](https://780925830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiQfLim2uDaLOZRkgWkOk%2Fuploads%2Fgit-blob-06043e091d1b784a79aa033281a21acb2b346cf6%2F02_instalacion_linux_dir_datos.png?alt=media)

If the previous installation did not have a custom data path, select **N**.

#### 3) Summary and installation

Once the above options are completed, the installer shows a summary with the selected values.

After confirmation, the files are copied and the update process ends.

![summary](https://780925830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiQfLim2uDaLOZRkgWkOk%2Fuploads%2Fgit-blob-cc874d00fe943189fa85e7d4de61660afd09c2c8%2F06_actualizacion_linux_fin.png?alt=media)

There is no need to request a new license: the license file from the source version is compatible with the updated version.

### Source version 5.2.1 or earlier with no OS change

Once the installer 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`
* Carry out the [product installation](#procedimiento-de-instalación).
* Request a new [license file](#licencia-de-uso).
* Migrate the configuration from the previous version. For 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 customer's installation.
* The script **migra-cfg.bash** performs three different steps, and if one fails, after fixing the error, it can be relaunched using the option **-c** indicating the desired step `cfg2txt | txt2cfg | migragc`

#### Neither the old nor the new installation has EDI\_DATA defined

If neither the old nor the new installation has EDI\_DATA defined (Editran data files directory), proceed as follows:

* Go to *\<home-editran>***/bin** and run:

  ```bash
  ../inst/migra-cfg.bash
  ```
* The script reports the steps being performed, 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 asked 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.

  ```
  Dump Editran/P profiles to text /opt/editran/migration/perfilesP.txt
  Dump Editran/G profiles to text /opt/editran/migration/perfilesG.txt
  ```
* If it is detected that the old profiles have configurations that are obsolete in this version, the following message will be shown:

  ```
  Obsolete configuration [WARN]

  Profiles with data incompatible with the Editran installation have been detected.

  You can consult them in /opt/editran/migration/configuracionObsoleta.csv

  If you continue with the migration, they will be updated with values that will need to be reviewed by the operator.

  Do you want to continue? (yes/no)?:
  ```
* If there are no obsolete configurations, the following message will appear:

  ```
  Obsolete configuration [OK]
  ```
* In the next step, the profile cfg files are generated:

  ```
  Configuring Editran/P /opt/editran/migration/perfilesP.txt
  Configuring Editran/G /opt/editran/migration/perfilesG.txt
  ```
* Finally, the keys of the Editran/GC module 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 without Editran/GC module

    ```
    RSA: the keys /opt/editran.v510/ckds.rsa must be migrated manually
    ```
  * The result (OK or ERROR) of the key migration is shown:

    ```
    Migrate Editran/GC [OK]
    ```
  * Finally, the RSA keys are verified:

    ```
    RSA key review [OK]
    ```
* If error messages appear during this process, you must contact Editran Technical Support and send the contents of the directory *\<home-editran>***/migration** so that those messages can be assessed.

#### The old or the new installation has EDI\_DATA defined

If the old or the new installation has **EDI\_DATA**defined, the migration script will automatically use the path contained in that variable to search for the files to migrate, without asking for it on screen.

**EDI\_DATA configuration before running the migration:**

According to the EDI\_DATA configuration in the old and new versions, follow the steps indicated in the table:

| Old version                | New version                | Temporarily set EDI\_DATA as | Folder where the script will look for the profiles |
| -------------------------- | -------------------------- | ---------------------------- | -------------------------------------------------- |
| EDI\_DATA=/path/to/dataOld | EDI\_DATA=/path/to/dataNew | EDI\_DATA=/path/to/dataOld   | /path/to/dataOld                                   |
| EDI\_DATA=/path/to/dataOld | Without EDI\_DATA          | -                            | /path/to/dataOld                                   |
| Without EDI\_DATA          | EDI\_DATA=/path/to/dataNew | -                            | /path/to/dataNew                                   |

**Source files:**

Before running the script, check that the folder where the script looks for the profiles contains all the files required according to the source Editran version. If any are missing, copy them from the old installation:

| Old version          | Files that must be in the source folder                                                                                                                       |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Earlier than 520** | <p><code>editranp.cfg</code><br><code>editrang.cfg</code><br><code>controlGC.cfg</code><br>directory <code>.rsa</code><br><code>ckds.des</code></p>           |
| **520**              | <p><code>cfg/editranp.cfg</code><br><code>cfg/editrang.cfg</code><br><code>cfg/controlGC.cfg</code><br><code>cfg/.rsa</code><br><code>bin/ckds.des</code></p> |
| **Later than 520**   | <p><code>cfg/editranp.cfg</code><br><code>cfg/editrang.cfg</code><br><code>cfg/controlGC.cfg</code><br><code>cfg/.rsa</code><br><code>cfg/ckds.des</code></p> |

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)

**Migration:**

At this point you can go to *\<home-editran>***/bin** and run:

`../inst/migra-cfg.[ba]sh`

* The script reports the steps being performed, 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 asked 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.

  ```
  Dump Editran/P profiles to text /opt/editran/migration/perfilesP.txt
  Dump Editran/G profiles to text /opt/editran/migration/perfilesG.txt
  ```
* If it is detected that the old profiles have configurations that are obsolete in this version, the following message will be shown:

  ```
  Obsolete configuration [WARN]

  Profiles with data incompatible with the Editran installation have been detected.

  You can consult them in /opt/editran/migration/configuracionObsoleta.csv

  If you continue with the migration, they will be updated with values that will need to be reviewed by the operator.

  Do you want to continue? (yes/no)?:
  ```
* If there are no obsolete configurations, the following message will appear:

  ```
  Obsolete configuration [OK]
  ```
* In the next step, the profile cfg files are generated:

  ```
  Configuring Editran/P /opt/editran/migration/perfilesP.txt
  Configuring Editran/G /opt/editran/migration/perfilesG.txt
  ```
* Finally, the keys of the Editran/GC module 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 without Editran/GC module

    ```
    RSA: the keys /opt/editran/share/ckds.rsa must be migrated manually
    ```
  * The result (OK or ERROR) of the key migration is shown:

    ```
    Migrate Editran/GC [OK]
    ```
  * Finally, the RSA keys are verified:

    ```
    RSA key review [OK]
    ```
* If error messages appear during this process, you must 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 OSs

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

* Perform the product installation.
* Request a new [license file](#licencia-de-uso).
* Export the profiles to plain text in the original OS. Run the commands respecting the names of the txt files shown in them:

  ```bash
  ediperfi -r -a -operfilesP.txt
  igaperfi -r -a -operfilesG.txt
  ```
* Create the directory in the new installation *\<home-editran>***/migration**.

#### Case A: the new installation does not have EDI\_DATA

* Inside *\<home-editran>***/migration** create a new directory, for example *\<home-editran>***/migration/origen**.
* That will be the directory you must indicate to the script when it asks for the path of the version to migrate.

#### Case B: the new installation has EDI\_DATA

* The path defined in **EDI\_DATA** will be the one the script uses as the source folder.
* If that path does not match the folder where the old profiles are located, temporarily adjust the value of **EDI\_DATA** before running the migration.
* In both cases, copy the files from the old version into the source folder following the structure in the table:

  | Old version          | Contents of the source directory                                                       |
  | -------------------- | -------------------------------------------------------------------------------------- |
  | **Earlier than 520** | <p>perfilesP.txt<br>perfilesG.txt<br>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> |
  | **Later than 520**   | <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**.

  ```bash
  ../inst/migra-cfg.[ba]sh [-w] txt2cfg
  ```

  In this case, the actions and messages that the migration utility shows to the user are:

  ```
  The user is asked 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
  ```
* In case A, since there is no EDI\_DATA in the new installation, the full path of the migration folder will be requested:

  ```
  Enter the path of the version to migrate: /opt/editran/migration/v510
  Path: /opt/editran/migration/v510
  ```
* In case B, if EDI\_DATA exists, the message will be shown:

  ```
  EDI_DATA detected
  Path: /opt/editran/share
  ```
* If it is detected that the old profiles have configurations that are obsolete in this version, the following message will be shown:

  ```
  Obsolete configuration [WARN]

  Profiles with data incompatible with the Editran installation have been detected.

  You can consult them in /opt/editran/migration/configuracionObsoleta.csv

  If you continue with the migration, they will be updated with values that will need to be reviewed by the operator.

  Do you want to continue? (yes/no)?:
  ```
* If there are no obsolete configurations, the following message will appear:

  ```
  Obsolete configuration [OK]
  ```
* Migration of profile files from text files.

  ```
  Configuring Editran/P [/opt/editran/migration/v510/perfilesP.txt] [OK]
  Configuring Editran/G [/opt/editran/migration/v510/perfilesG.txt] [OK]
  ```
* Finally, the keys of the Editran/GC module 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 without Editran/GC module

    ```
    RSA: the keys /opt/editran/migration/v510/ckds.rsa must be migrated manually
    ```
  * The result (OK or ERROR) of the key migration is shown:

    ```
    Migrate Editran/GC [OK]
    ```
  * Finally, the RSA keys are verified:

    ```
    RSA key review [OK]
    ```
* If error messages appear during this process, you must 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.
  ```
* Changing the OS 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

If there are specific User Programs that are executed as procedures before and after transmissions, you must adapt them taking into account the following changes:

* 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 executed when the transmission ends successfully. In any other case, including errors in the upload and download process, the exception program will be executed.
* It is recommended that user scripts be located in bin/utils, to differentiate them from the product software.

The following table shows the arguments of each type of user program:

| Variable | Exception                      | Pre                      | Post                                                |
| -------- | ------------------------------ | ------------------------ | --------------------------------------------------- |
| 0        | Program name                   | Program name             | Program name                                        |
| 1        | Presentation                   | Presentation             | Presentation                                        |
| 2        | Sending (E) or Receiving       | Sending (E) or Receiving | Sending (E) or Receiving                            |
| 3        | Transmission result (4 digits) | Local Code               | Local Code                                          |
| 4        | Local Code                     | Remote Code              | Remote Code                                         |
| 5        | Remote Code                    | Application              | Application                                         |
| 6        | Application                    |                          | Path of the file with the list of transmitted files |

In the version update, the production environment is not left prepared to work with User Programs from previous versions, and their adaptation to the new format is recommended. In general, the changes to be made in this process are:

* If your scripts use the arguments with which Editran invokes them, adapt the necessary values to those of the current version (For example, if you used value 4 to retrieve the local Code in a User Program after receiving, you must change it to 3.).

### User scripts in backward-compatible mode

We do not recommend using this option, but there is the possibility of indicating that scripts will be used that expect the input parameters of earlier versions. To do so, the EDItran script must be edited as follows:

```
#################
#EDI_GUPGRADE: Uncomment to work in compatibility mode with earlier/later scripts from older versions
EDI_GUPGRADE=1
export EDI_GUPGRADE
```

The following table shows the arguments of each type of user program depending on the presence or absence of EDI\_GUPGRADE:

| Variable | Exception                      | <p>Earlier<br>WITHOUT EDI\_GUPGRADE</p> | <p>Earlier<br>WITH EDI\_GUPGRADE</p> | <p>Later<br>WITHOUT EDI\_GUPGRADE</p>               | <p>Later<br>WITH EDI\_GUPGRADE</p>                  |
| -------- | ------------------------------ | --------------------------------------- | ------------------------------------ | --------------------------------------------------- | --------------------------------------------------- |
| 0        | Program name                   | Program name                            | Program name                         | Program name                                        | Program name                                        |
| 1        | Presentation                   | Presentation                            | Presentation                         | Presentation                                        | Presentation                                        |
| 2        | Issuance (E) or Reception (R)  | Issuance (E) or Reception (R)           | Issuance (E) or Reception (R)        | Issuance (E) or Reception (R)                       | Issuance (E) or Reception (R)                       |
| 3        | Transmission result (4 digits) | Local Code                              | RESULT                               | Local Code                                          | RESULT                                              |
| 4        | Local Code                     | Remote Code                             | Local Code                           | Remote Code                                         | Local Code                                          |
| 5        | Remote Code                    | Application                             | Remote Code                          | Application                                         | Remote Code                                         |
| 6        | Application                    |                                         | Application                          | Path of the file with the list of transmitted files | Application                                         |
| 7        |                                |                                         |                                      |                                                     | Path of the file with the list of transmitted files |

## Appendices

### Installation and change of the HMK master key

The Master key guarantees the integrity of the Auxiliary keys stored in the file **ckds.des**, since all 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 process of installing the Master key, is invoked with \<current\_key> = \<new\_key>, that is, the user specifies the Master key and its repetition. The command will validate that both keys are equal.

Yes **pinsdes** is used to perform the change of 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, 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 of the hexadecimal alphabet) of the new Master key must have an odd number of bits with value 1.

During the process of changing the Master key, it is advisable to make a backup copy of it. Thus, if an error were to occur 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.3-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.
