> For the complete documentation index, see [llms.txt](https://documentation.atempo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.atempo.com/miria-4.6/admin-guide/deployment/installing-miria-server.md). Agents can also search and read this documentation through its [MCP server](https://documentation.atempo.com/~gitbook/mcp).

# Installing Miria Server

This chapter explains how to install Miria Server interactively or in silent mode. It includes useful information that enables you to understand the server component.

## Before You Install

See [<mark style="color:blue;">Prerequisites to Install</mark>](https://documentation.atempo.com/miria-4.6/admin-guide/deployment/preparing-to-install.md) for general prerequisites and hardware requirements.

### Operating System Prerequisites

To ensure Miria Server works correctly, your operating system must meet these requirements.

{% tabs %}
{% tab title="Windows" %}
No additional operating system packages are required.
{% endtab %}

{% tab title="Linux" %}
Install a few packages before running the installer.

#### Console or silent install (CLI)

**DEB-based distributions**

```bash
apt-get update && apt-get install -y --no-install-recommends psmisc gawk libgomp1
```

**RPM-based distributions**

```bash
yum update && yum install psmisc gawk libgomp
```

#### Graphical install (GUI)

**DEB-based distributions**

```bash
apt-get update && apt-get install -y --no-install-recommends psmisc gawk libxext6 libxtst6 libxrender1 fontconfig fonts-dejavu libgomp1
```

**RPM-based distributions**

```bash
yum update && yum install psmisc gawk libXext libXtst libXrender fontconfig dejavu-sans-fonts dejavu-serif-fonts libgomp
```

{% hint style="info" %}
On CentOS 8 or later, also run:

```bash
yum install glibc-all-langpacks libgomp1
```

{% endhint %}

Graphical mode requires a local graphical environment (X Windows), or a `DISPLAY` variable set for a remote X server.
{% endtab %}
{% endtabs %}

### Secured and Unsecured Access to the Server

By default, Miria uses HTTPS; however, you can configure the Miria server to accept both HTTP and HTTPS connections.\
It is recommended to use only secured protocol (HTTPS) for all communications with the server.

## Installing Server in Graphical Mode

Launch the Installation Wizard in the manner corresponding to your operating system.

{% tabs %}
{% tab title="Windows" %}
Run <kbd>Atempo-Miria-4.5.1.0-Server-Agent-Windows-X64.exe</kbd>

If User Account Control (UAC) is enabled, approve the prompt. You may need to enter an administrator password.
{% endtab %}

{% tab title="Linux" %}
{% stepper %}
{% step %}

### Open a shell

Change to the directory where you downloaded the installer.
{% endstep %}

{% step %}

### Extract the setup

```bash
tar xvfz installMiria.tgz
```

{% endstep %}

{% step %}

### Launch the installer

```bash
sh ./Atempo-Miria-4.5.1.0-Server-Agent-Linux-X64.bin
```

{% endstep %}
{% endstepper %}
{% endtab %}
{% endtabs %}

This table describes the parameters that you can enter in the Installation Wizard to perform a server installation:

<details>

<summary><strong>Installation Wizard parameters</strong></summary>

| Parameter                           | Options and Actions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| License Agreement                   | Carefully read the general licensing conditions in their entirety and then select **I accept the terms of the License Agreement**.                                                                                                                                                                                                                                                                                                                                                                                                                |
| Installation Type Selection         | Select **Server**.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| Choose Install Set                  | <p>These are the valid options:</p><p>• <strong>Typical</strong> – Recommended for most users.</p><p>• <strong>Custom</strong> – Installation with customized features.</p><blockquote><p><strong>Note:</strong> If the installation Wizard detects a Miria database, it warns you that it will update the Miria server. See INST to backup your Miria database.</p></blockquote><p>Click <strong>Next</strong> for the setup to update the Miria server.</p>                                                                                     |
| Choose Install Folder               | Select the path for the installation.The default path is entered automatically, but you can change it. Manually enter a new path or click **Choose** to open the **Select a Folder** window and browse your network to find a new destination folder.                                                                                                                                                                                                                                                                                             |
| Optional Components                 | **For a Custom installation only.**&#x44;epending on the operating system, the installation wizard enables you to install the Atempo Miria Media Manager (Windows, Linux).                                                                                                                                                                                                                                                                                                                                                                        |
| Miria Server                        | <p>Displays these read-only information fields for Typical installation:</p><p>• <strong>Environment Name</strong> – <kbd>ADA</kbd></p><p>• <strong>Miria Server Name</strong> – <code>\<localhost></code> (the machine where Miria is being installed).</p><p>• <strong>Port</strong> – <kbd>2524</kbd></p>                                                                                                                                                                                                                                      |
| Miria Communication Ports           | <p>This port enables Miria interfaces to communicate with the Miria server.Select the checkbox for one or both options:</p><p>• <strong>HTTP Port</strong> – Unencrypted access to the server at login. Default port: <kbd><strong>80</strong></kbd>(change if already in use).</p><p>• <strong>HTTPS Port</strong> – Encrypted access to the server at login. Default port: <kbd><strong>443</strong></kbd>(change if already in use). See <mark style="color:blue;">Secured and Unsecured Access to the Server</mark> for details on access</p> |
| <p><br>ports.</p>                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Install Media Manager               | <p>Select one of the following options:</p><p>• <strong>Do not install AMM Component</strong> – The setup does not propose to install Media Manager.</p><p>• <strong>Install AMM Agent</strong> – The setup installs a Media Manager agent. See <mark style="color:blue;">Media Manager - Agent Installation.</mark></p><p>• <strong>Install AMM Server (contains an agent)</strong> – The setup installs a Media Manager server. See <mark style="color:blue;">AMM Installation - Server Installation</mark></p>                                 |
| Miria Database (PostgreSQL)         | For Custom installation only.Enter a port for the Miria database.This is a PostgreSQL database using default port <kbd>**5433**</kbd>.Modify the port number if necessary.                                                                                                                                                                                                                                                                                                                                                                        |
| Optional Components (Media Manager) | For Custom installation only.Enter information required for the Media Manager component. See also <mark style="color:blue;">Installing Media Manager.</mark>                                                                                                                                                                                                                                                                                                                                                                                      |
| Firewall Configuration              | Appears only if firewall is enabled.• **Windows / Linux RedHat** – Choose **Yes** to automatically configure firewall rules for Miria ports.• **Linux SUSE** – Firewall is detected but must be configured manually.                                                                                                                                                                                                                                                                                                                              |
| Pre-Installation Summary            | Review installation parameters and click **Install** to start installation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Install Complete                    | Displays the installation exit status after setup finishes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |

</details>

## Installing the Server in Console Mode

If the server cannot be installed in graphical mode, you can use the command line interface (CLI) to perform the installation interactively. It is identical to the installation wizard and takes you stepby-step through the different sub-installations.

To use the console mode, run the installer in CLI and add the <kbd>i-console</kbd> parameter.

> **Example**: <mark style="color:$warning;">On Linux,</mark> <kbd><mark style="color:$warning;">launch sh installMiria.bin -i console.<mark style="color:$warning;"></kbd>

## Installing the Server in Silent Mode

The silent mode can be used to automate the installation process. This installation mode requires no user interaction.\
The setup for your operating system contains a sample file (silent\_install.txt). This file\
includes a complete description of installation and update parameters.\
There are three commands to run the silent installer. This depends on how the values are set for the required installation parameters. Each option is outlined below.

**To run the silent setup with all default values**

> <mark style="color:$warning;">Launch</mark> <kbd><mark style="color:$warning;">installMiria.bin -i silent.<mark style="color:$warning;"></kbd>

**To run the silent setup with specified installation parameters**

The silent setup will be done with specified installation parameters set in the <kbd>silent\_ install.txt</kbd> sample file. Use a text editor to customize and rename this file or to create a new file.

1. Make a copy of the sample file and save it as a text file.
2. Set the value of the required installation parameters. These are indicated in the parameter's header section of the sample file. By default, <kbd>INSTALLATION\_TYPE</kbd> is set to install the Server component.
3. Save your changes.
4. Open a command window and go to Miria installer directory.
5. Verify that the directory contains the file that you created.
6. <mark style="color:$warning;">Launch</mark> <kbd><mark style="color:$warning;">installMiria.bin -i silent -f silent\_install.txt.<mark style="color:$warning;"></kbd>

**To run the silent setup with default values except for the value provided**

> <mark style="color:$warning;">Launch</mark> <kbd><mark style="color:$warning;">installMiria.bin -i silent -DOPTION1=X -DOPTION2=Y.<mark style="color:$warning;"></kbd> <mark style="color:$warning;">Option names and values are detailed in the</mark> <kbd><mark style="color:$warning;">silent\_install.txt file.<mark style="color:$warning;"></kbd>

## Server Installation Logs

The installation log files for the server are stored in this Miria installation directory path:

* **Windows**. <kbd>Miria\Uninstall\Install\_Logs</kbd>
* **Linux and macOS**.<kbd>Miria/Uninstall/Install\_Logs</kbd>

## Server Services and Daemons

The server installation sets up and starts these services:

<table data-header-hidden><thead><tr><th width="149"></th><th></th></tr></thead><tbody><tr><td><strong>Operating System</strong></td><td><strong>Services and Daemons</strong></td></tr><tr><td><strong>Windows</strong></td><td><p>These are the Windows services:</p><ul><li>ADA : Apache2</li><li>ADA : Server Engine</li><li>PostgreSQL (or MaxDB when upgrading an existing installation) : ADA</li></ul></td></tr><tr><td><strong>Linux</strong></td><td><p>These are the Linux services:</p><ul><li>Apache server.</li><li>Miria server engine. The <kbd>ADA_ADA</kbd> script, located in the <code>/etc/init.d</code> directory, automatically launches this service at every server machine reboot.</li><li>PostgreSQL engine (or MaxDB when upgrading an existing installation). The <kbd>ADADB_ADA</kbd> script, located in the <code>/etc/init.d</code> directory, automatically launches this service at every server machine reboot.</li></ul></td></tr></tbody></table>

## Optimizing Linux Installation

The installation on Linux creates in the \<ADA\_HOME>/Tools/tuning installation directory these configuration files :

* <kbd>linux\_sysctl.txt.</kbd>
  * For RedHat 7.x, using the <kbd>root</kbd> account, copy this file in the <kbd>/etc/sysctl.d/50-</kbd>\ <kbd>ADA.conf</kbd> directory.
  * For RedHat 5.x/6.x, using the <kbd>root</kbd> account, append this file (<kbd>append</kbd> command) to <kbd>/etc/sysctl.conf file.</kbd>
* <kbd>limits.conf.</kbd> Increases the number of files that a process can open.

**To enable the limits.conf file**

1. Using the root account, open the /etc/security/limits.conf file in a text editor.
2. At the end of the file, add these two lines:
   1. hard nofile 65536
   2. soft nofile 16384
3. Save the /etc/security/limits.conf file.
4. Run this command: <kbd>sysctl --system</kbd>

If you experience problems enabling the <kbd>linux\_sysctl.txt</kbd> and <kbd>limits.conf</kbd> files, turn off the firewall by running these commands:

* **RedHat 6.x**\
  `service iptables stop`\
  `chkconfig iptables off`
* **RedHat 7.x**\
  `systemctl stop firewalld`
* **RedHat 5.x/6.x**\
  `systemctl disable firewalld`

**Switching to an internal or external Miria Server Database**

By default, during Miria's installation, a PostgreSQL database is installed on the Miria server. This database can be switched to another PostgreSQL server for better integration into the existing infrastructure. The CLI allows the database switch and only changes all references in order to provide Miria with new connection settings. These settings are used to connect to another PostgreSQL server.

This section describes how to switch from a PostgreSQL internal database to a PostgreSQL external database or vice versa.

### Prerequisites

* Prior to the database switch, the Miria database content must be migrated to the PostgresSQL external server or vice versa. You can use the create\_data\_model option to initialize a new database (BETA).
* The external PostgreSQL user must have a Superuser status. Otherwise, the create\_ data\_model command will fail.
* PostgreSQL should be installed on the external machine before swiching databases.
* PostgreSQL must be installed with the tablefunc module (available in the contrib library).
* The PostgreSQL server must be reached through the port provided in the Miria server.
* The database on the destination server must have the same name as the database on the source server.

### ada\_service -switch\_data\_model command

To switch from a PostgreSQL internal database to a PostgreSQL external database, use the following command:

<kbd>ada\_service -switch\_data\_model -db\_admin\_identity {Name:Password} -db\_name {Name} -db\_port {Port} -db\_hostname {hostname} \[-db\_ssl\_mode {prefer|disable|allow|require} ] Switch between internal and external Postgres data model</kbd>

This table describes the options that you can use with this command:

<table data-header-hidden><thead><tr><th width="181.66668701171875"></th><th></th></tr></thead><tbody><tr><td><strong>Option</strong></td><td><strong>Description</strong></td></tr><tr><td><strong>-db_admin_identity</strong></td><td>Specifies the login and password of the administrator of the target PostgreSQL database (example: <code>postgres:postgres</code>).</td></tr><tr><td><strong>-db_name</strong></td><td>Specifies the name of the source PostgreSQL database.</td></tr><tr><td><strong>-port</strong></td><td>Specifies the communication port for the target PostgreSQL server.</td></tr><tr><td><strong>-db_hostname</strong></td><td>Specifies the name of the target machine.</td></tr><tr><td><strong>-db_ssl_mode</strong></td><td>Specifies the TCP/IP connexion is SSL-secured. The authorized values are <code>prefer</code> | <code>disable</code> | <code>allow</code> | <code>require</code>.</td></tr></tbody></table>

Example of switching from an internal database to an external database

In this example, an external PostgreSQL external database is used:

* **Machine name**: <kbd>serverpg</kbd>
* **Port**: <kbd>5438</kbd>
* **User db\_admin:** <kbd>postgres</kbd>
* **Password db\_admin**: <kbd>postgres</kbd>
* **Database name:** <kbd>ADA</kbd>

To switch to an external database :

1. Run the command: ada\_service -switch\_data\_model -db\_admin\_identity postgres:postgres -db\_name ADA -db\_port 5438 -db\_hostname serverpg A confirmation dialog containing a summary of the selected parameters appears : **Connection to external DB successfully, SSL:off, mode:prefer**
2. Confirm that you want to switch to an external PostgreSQL database.
3. Specify the host, database name, port and admin user for the target database. In this example:
   1. **Host**: <kbd>serverpg</kbd>
   2. **DB Name:** <kbd>ADA</kbd>
   3. **Port**: <kbd>5438</kbd>
   4. **Admin user**: <kbd>postgres</kbd>

A confirmation dialog is displayed when the database switched successfully.

### Example of switching from an external database to an internal database

In this example,a PostgreSQL internal database is used:

* **Machine name:** <kbd>localhost</kbd>
* **Port**: <kbd>5433</kbd>
* **User db\_admin**: <kbd>postgres</kbd>
* **Password db\_admin**: <kbd>postgres</kbd>
* **Database name**: <kbd>ADA</kbd>

To switch to an internal database

1. Run the command: ada\_service -switch\_data\_model -db\_admin\_identity postgres:postgres -db\_name ADA -db\_port 5433 -db\_hostname localhost
2. Confirm that you want to switch to an internal PostgreSQL database.
3. Specify the host, database name, port and admin user for the target database. In this example:

* **Host**: <kbd>localhost</kbd>
* **DB Name**: <kbd>AD</kbd>
* **Port**: <kbd>5433</kbd>
* **Admin user**: <kbd>postgres</kbd>

A confirmation dialog is displayed when the database switched successfully.

## Switching to an internal or external AMM Server Database

This section describes how to switch an AMM database from a PostgreSQL internal database to a PostgreSQL external database or vice-versa.

> **Note** : Migrating database data must be done manually before switching to external\
> database.

### Prerequisites

* Prior to the database switch, the AMM database content must be migrated to the\
  PostgreSQL external server or vice versa.
* External PostgreSQL cluster where AMM database will be hosted.
* The external PostgreSQL user must have a Superuser status. Otherwise, the <kbd>create\_</kbd> \ <kbd>data\_model</kbd> command will fail.
* PostgreSQL should be installed on the external machine before swiching databases.
* The database on the destination server must have the same name as the database on the source server in case of existing database.
* You must have at least a Python interpreters 3.6. You need to install one, or to use the one included with the Miria server.\
  Path to the Miria Python interpreter: <kbd>/Miria/Binary/3rdParty/python/bin/python3</kbd>

### amm\_update\_config.py command

You can find the script in this location: <kbd>/Miria/AMM/bin/amm\_update\_config.py.</kbd>

You can switch from a PostgreSQL internal database to a PostgreSQL external database, using the following command:

<kbd>amm\_update\_config.py -u \<DATABASE\_USER> {Name} -w \<DATABASE\_PWD> {Password} -d \<DATABASE\_NAME> {Name} -p \<DATABASE\_PORT\_NUMBER> {Port} -n \<DATABASE\_ HOSTNAME> {hostname} \[-s {prefer|disable|allow|require|verify-ca|verifyfull} ] Switch between internal and external Postgres data model</kbd>

This table describes the options that you can use with this command:

<table data-header-hidden><thead><tr><th width="256.33331298828125"></th><th></th></tr></thead><tbody><tr><td><strong>Option</strong></td><td><strong>Description</strong></td></tr><tr><td><strong>-h</strong></td><td>If you need assistance, you can use this command to get help.</td></tr><tr><td><strong>-u DATABASE_USER</strong></td><td>Specifies the login of the super user of the target PostgreSQL database.</td></tr><tr><td><strong>-w DATABASE_PWD</strong></td><td>Specifies the password of the super user of the target PostgreSQL database.</td></tr><tr><td><strong>-d DATABASE_NAME</strong></td><td>Specifies the name of the target PostgreSQL database.</td></tr><tr><td><strong>-db_name</strong></td><td>Specifies the name of the source PostgreSQL database.</td></tr><tr><td><strong>-p DATABASE_PORT_NUMBER</strong></td><td>Specifies the communication port for the target PostgreSQL server.</td></tr><tr><td><strong>-port</strong></td><td>Specifies the communication port for the target PostgreSQL server.</td></tr><tr><td><strong>-n DATABASE_HOSTNAME</strong></td><td>Specifies the name of the machine that hosts PostgreSQL database.</td></tr><tr><td><strong>-db_hostname</strong></td><td>Specifies the name of the target machine.</td></tr><tr><td><strong>-db_admin_identity</strong></td><td>Specifies the login and password of the administrator of the target PostgreSQL database (example: <code>postgres:postgres</code>).</td></tr><tr><td><strong>-s</strong></td><td>Specifies the TCP/IP connection is SSL-secured. Authorized values: <code>disable</code>, <code>allow</code>, <code>prefer</code>, <code>require</code>, <code>verify-ca</code>, <code>verify-full</code>.</td></tr><tr><td><strong>-db_ssl_mode</strong></td><td>Specifies the TCP/IP connexion is SSL-secured. Authorized values: <code>prefer</code> | <code>disable</code> | <code>allow</code> | <code>require</code>.</td></tr></tbody></table>

### From a new install

1. Stop the mm\_agent, mm\_server and mm\_db services. The process should stop.
2. Create a database \<DB\_NAME> on an external postgreSQL server: /Miria/AMM/Database/PostgreSQL/bin/createdb -p \<DATABASE\_PORT\_NUMBER> -h \<DATABASE\_HOST\_NAME> -U \<DATABASE\_SUPER\_USER> \<DB\_NAME>
3. Create an AMM datamodel on the the remote database: <kbd>alias amm\_psql=/Miria/AMM/Database/PostgreSQL/bin/psql amm\_psql -p \<DATABASE\_PORT\_NUMBER> -h \<DATABASE\_HOST\_NAME> -U \<DATABASE\_ SUPER\_USER> -d \<DB\_NAME> -f /Miria/AMM/conf/create\_mm\_db</kbd>
4. Run the script <kbd>amm\_update\_config.py</kbd> delivered with <kbd>mm\_server: python amm\_update\_config.py -n \<DATABASE\_HOST\_NAME> -d \<DB\_NAME> -u \<DATABASE\_USER> -w \<DATABASE\_PWD> -s prefer -p \<DATABASE\_PORT\_NUMBER> Check if the /etc/Atempo/AMM/env.ib have the correct information set according to amm\_ update\_config.py</kbd>
5. Remove the dependence on amm\_db from amm\_server:

   • Edit the file /etc/systemd/system/amm\_server.service

   • Remove the entry Wants=amm\_db.server in the \[Unit] section

   • Run the command systemctl daemon-reload to take update into account.
6. Restart the AMM server.
7. Check the mm\_server log. You should have the message about updating the remote database. The last log message must be <kbd>mm\_server is ready.</kbd>
8. Check the process list <kbd>ps -edaf | | grep PostgreSQL</kbd>. There is no local\
   PostgreSQL database from AMM.

### From an existing install

1. Stop the mm\_agent, mm\_server and mm\_db services. Process should stop.
2. Backup the current AMM database /Miria/AMM/bin/mm\_adm\_database --backup -p \<EXPORT\_PATH>The export path is the path where you are going to export the pg core dump. You will then need it to re-import the database.
3. Create a database AMM on the external postgreSQL: /Miria/AMM/Database/PostgreSQL/bin/createdb -p \<DATABASE\_PORT\_NUMBER> -h \<DATABASE\_HOSTNAME> -U \<DATABASE\_SUPER\_USER\_NAME> AMM
4. Run the script amm\_update\_config.py delivered with mm\_server: python amm\_update\_config.py -n \<DATABASE\_HOST\_NAME> -d AMM -u \<DATABASE\_ USER> -w \<DATABASE\_PWD> -s prefer -p \<DATABASE\_PORT\_NUMBER> Check if the /etc/Atempo/AMM/env.ib have the correct information set according to amm\_ update\_config.py
5. restore previous backuped database /Miria/AMM/bin/mm\_server -r \<EXPORT\_PATH>
6. Remove the dependence on amm\_db from amm\_server:

   • Edit the file /etc/systemd/system/amm\_server.service

   • Remove the entry Wants=amm\_db.server in the \[Unit] section

   • Run the command systemctl daemon-reload to take update into account.
7. Restart the mm\_server only. Do not restart mm\_db. Check the mm\_server log, you should have the message about updating remote database. The last log message must be mm\_server is ready.
8. Check the process list <kbd>ps -edaf | grep PostgreSQL.</kbd> There is no local PostgreSQL database from AMM.

Example of switching from an internal AMM database to an external database

In this example, an external PostgreSQL database is used:

* **Machine name**: serverpg
* **Port**: 5438
* **User db\_admin**: postgres
* **Password db\_admin**: postgres
* **Database name**: AMM

**To switch to an external database**

1. Run the command:

   python amm\_update\_config.py -d AMM -p 5438 -n serverpg -u postgres -w postgres A confirmation dialog containing a summary of the selected parameters appears : **Connection to external DB successfully, SSL:off, mode:prefer**
2. Confirm that you want to switch to an external PostgreSQL database.
3. Specify the host, database name, port and admin user for the target database. In this example:
   1. **Host**: <kbd>serverpg</kbd>
   2. **DB Name**: <kbd>AMM</kbd>
   3. **Port**: <kbd>5438</kbd>
   4. **Admin user**: <kbd>postgres</kbd>

A confirmation dialog is displayed when the database switched successfully.

Example of switching from an external AMM database to an internal database

In this example,a PostgreSQL internal database is used:

* **Machine name:** <kbd>localhost</kbd>
* **Port**: <kbd>5433</kbd>
* **User db\_admin**: <kbd>postgres</kbd>
* **Password db\_admin**: <kbd>postgres</kbd>
* **Database name**: <kbd>AMM</kbd>

**To switch to an internal database**

1. Run the command:

   <kbd>python amm\_update\_config.py -d AMM -p 5433 -n localhost -u postgres -w postgres</kbd>
2. Confirm that you want to switch to an internal PostgreSQL database.
3. Specify the host, database name, port and admin user for the target database. In this example:
   1. **Host**: <kbd>localhost</kbd>
   2. **DB Name**: <kbd>AMM</kbd>
   3. **Port**: <kbd>5433</kbd>
   4. **Admin user**: <kbd>postgres</kbd>

A confirmation dialog is displayed when the database switched successfully.

## Creating Several Database Instances

The Typical and Custom setups install a database that stores information related to Miria\
administration, archiving, and retrieval.

The setup creates only one database instance called <kbd>ADA</kbd>.However, once the Miria server is installed, you can easily create additional database instances that you can use as testing databases, for example.

When logging on to the Administration Console, you can select the database to which you want to connect. An external template can be generated.

### ada\_service Command

The ada\_service command enables you to create, list, and delete database instances. The\
ada\_service command must be run on the Miria server.

The Miria binaries are located in the $ADA\_HOME$/Binary/Bin directory. You or the user root can run them from a command terminal after navigating to this directory.

* **Windows**. It is safer to use the Environment Prompt, which ensures that all proper\
  environment variables are set:\
  Select Start All Programs Miria Miria Environment Command Prompt.
* **Linux**. Open a terminal in the $ADA\_HOME$/Binary directory and set the Miria environment by running this command: <kbd>. .ADA.sh</kbd>

### Command Syntax

To create an additional instance, use this command syntax:

<kbd>ada\_service -create\_data\_model -db\_admin\_identitylogin:password -db\_name dbname -db\_type MaxDB|Postgres \[-db\_portportnb]</kbd>

To list the data models, use this command syntax:

<kbd>ada\_service -list\_data\_model</kbd>

To delete an instance, the root user can use this command syntax:

<kbd>ada\_service -delete\_data\_model -db\_name dbname -identity root:password</kbd>

This table describes the options that you can use with the <kbd>ada\_service</kbd> command:

<table data-header-hidden><thead><tr><th width="208.33331298828125"></th><th></th></tr></thead><tbody><tr><td><strong>Option</strong></td><td><strong>Description</strong></td></tr><tr><td><code>-create_data_model</code></td><td><p>Creates an additional instance to the Miria database.</p><p><br><br></p><p>Once the instance is created, a line describing the instance is added to the <code>$ADA_HOME/Binary/Conf/ada_servers</code> file:</p><p><br></p><p><code>DBName [HostName] [User] [Password] [DataBaseType] [DBName] [Schema] [Port] [Connect_Options]</code></p><p><br><br></p><p>Names of databases should be unique. You cannot create a new database using the same name as an existing one. This rule applies to both internal and external databases.</p></td></tr><tr><td><code>-delete_data_model</code></td><td><p>Enables the <code>root</code> user to delete the specified instance from the existing database.</p><p>Prerequisites to use the <code>-delete_data_model</code> option:</p><ul><li>Can only be run in the Miria server.</li><li>The <code>root</code> user cannot delete the instance of the database if it is the only one existing in the Miria configuration. Trying to delete the database unique instance exits the command on error and displays the <code>Default DB cannot be deleted</code> message.</li><li>No jobs must be running on the concerned database. Once the instance is deleted, Miria removes the line that describes the instance from the <code>$ADA_HOME/Binary/Conf/ada_servers</code> file.</li></ul></td></tr><tr><td><code>-db_admin_identity</code></td><td>The user must have the necessary rights to create databases. This option is available in beta version.</td></tr><tr><td><code>-db_name</code> <em>dbname</em></td><td><p>The <code>-db_name</code> option specifies:</p><ul><li>For the <code>-create_data_model</code> option, the name of the database instance to be created.</li><li>For the <code>-delete_data_model</code> option, the name of the data instance to be deleted.</li></ul></td></tr><tr><td><code>-list_data_model</code></td><td><p>Lists the data models defined in the <code>ada_servers</code> file.<br></p><p>This option provides this information for each data model:</p><ul><li>DB Name (logical name)</li><li>Host Name</li><li>User</li><li>DataBase Type</li><li>DB Name (instance)</li><li>Schema</li></ul></td></tr></tbody></table>

### Examples for Database Creation on a PostgreSQL Server

This topic includes two examples on how to create a new database on an internal or external PostgreSQL server.

> Note: Names of databases should be unique. You cannot create a new database using the same name as an existing one. This rule applies to both internal and external databases.<br>

The path for the <kbd>ada\_servers</kbd> file is different for each OS:

* **Windows** .<kbd>.\Miria\Binary\Conf</kbd>
* **Linux** .<kbd>./Miria/Binary/Conf/</kbd>

#### Creating a New Database on an Internal PostgreSQLServer

<kbd>ada\_service -create\_data\_model -db\_admin\_identity postgres:postgres -db\_name ADATEST -db\_type postgres -db\_port 5432</kbd>

A line is automatically added to the <kbd>ada\_servers</kbd> file describing the newly created instance:

* **Database admin identity:** postgres:postgres
* **Database name (logical name):** ADATEST
* **Type**: PostgreSQL
* **TCP Port**: 5432

#### Creating a New Database on an External PostgreSQL Server

<kbd>ada\_service -create\_data\_model -db\_admin\_identity postgres:postgres -db\_name serverpg:ADATEST -db\_type postgres -db\_port 5432</kbd>

A line is automatically added to the <kbd>ada\_servers</kbd> file describing the newly created instance:

* **Database server :** serverpg
* **Database admin identity :** postgres:postgres
* **Database name (logical name) :** ADATEST
* **Type** : PostgreSQL
* **TCP Port :** 5432


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://documentation.atempo.com/miria-4.6/admin-guide/deployment/installing-miria-server.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
