Docs Menu
Docs Home
/
Relational Migrator
/ / /

Run Relational Migrator as a System Service on RHEL/CentOS

On this page

  • Steps
  • Next Steps
  • Learn More

When you install Relational Migrator on a RHEL/CentOS server, you can also set up Relational Migrator to run as a system service. By 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/mongodb-relational-migrator/bin/MongoDB 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
  • Create a Project

  • Import a Project

Back

Install