Docs Menu
Docs Home
/ /

RHEL/CentOS Systems Installation

You can install Relational Migrator on a Red Hat Enterprise Linux (RHEL)/CentOS server. This installation method allows Relational Migrator to run on an unattended server. When running on an unattended server, Relational Migrator binds to any IP and port on the server and exposes it as a web application.

Relational Migrator uses the following file locations on RHEL/CentOS:

  • Configuration file

    ~/.mongodb/relational-migrator/user.properties

  • Downloaded JDBC Drivers

    ~/.mongodb/relational-migrator/Drivers

  • Log files

    ~/.mongodb/relational-migrator/migrator.log

  1. Download the latest .tar.gz binary from the release page.

  2. Install Relational Migrator.

    tar -xvzf relational-migrator-<version_number>-linux-amd64.tar.gz -C /opt

    Note

    You can extract the installation to a location other than the /opt/ directory.

  3. (Optional) To connect to Oracle or MySQL drivers, download and place the drivers into your Relational Migrator directory.

    1. To download and install MySQL or Oracle drivers, see the following:

    2. Copy the driver files to ~/.mongodb/relational-migrator/Drivers.

      To copy the driver, use the following example:

      curl https://download.oracle.com/otn-pub/otn_software/jdbc/216/ojdbc11.jar -O -L -b -o

    Note

    If Relational Migrator is running, you must restart the application after copying drivers to the Drivers directory.

    For more information, see Install on a Local Machine.

  4. Change the directory to the Relational Migrator /bin location and start the application.

    cd /opt/relational-migrator-<version_number>/bin
    ./relational-migrator
  5. Enable Relational Migrator to run as an unattended standalone server.

    In your user.properties file, uncomment spring.profiles.active: unattended.

  6. (Optional) Update TLS/SSL configuration properties.

    In your user.properties file, uncomment and update TLS/SSL configuration properties.

    It is recommended that you configure TLS/SSL for Relational Migrator on your unattended server. You can bind Relational Migrator to any IP and port on the server. For additional information, see SSL Configuration Properties.

  7. (Optional) Update the port that Relational Migrator runs on.

    By default, Relational Migrator is configured to run on port 8278. To change the port Relational Migrator runs on, update the server.port line in your user.properties file to specify your preferred port.

  8. Run Relational Migrator using the binary.

    The path to the bin directory is /opt/mongodb-relational-migrator/bin.

    To run Relational Migrator using the binary, run the following:

    cd /opt/relational-migrator-<version_number>/bin
    ./relational-migrator
  9. (Optional) Check logs for errors or other information.

    • The logs are located in ~/.mongodb/relational-migrator/migrator.log.

    • When running Relational Migrator as a system service, the path is under the service user’s home directory.

When you install Relational Migrator on a RHEL/CentOS server, you can also set up Relational Migrator to run as a system service. When running Relational Migrator as a system service, Relational Migrator automatically starts when the server starts.

  1. Create a /etc/systemd/system/migrator.service file.

    Copy the text below into the /etc/systemd/system/migrator.service file. Replace the binary path as needed.

    [Unit]
    Description=MongoDB Relational Migrator
    [Service]
    ExecStart="/opt/relational-migrator-<version_number>/bin/relational-migrator"
    [Install]
    WantedBy=multi-user.target
  2. Reload systemd to read the newly-created service:

    systemctl daemon-reload
  3. Enable the Relational Migrator service to run on startup and start for the current session.

    You can manage the service with systemctl commands. To run on startup and start the current session, run the following:

    systemctl enable migrator.service
    systemctl start migrator.service

Back

Windows Server

On this page