Debian Systems Installation
On this page
You can install Relational Migrator on a Debian 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.
About this Task
Relational Migrator uses the following file locations on Debian Linux:
Configuration file
~/Migrator/user.properties
Downloaded JDBC Drivers
/opt/mongodb-relational-migrator/lib/app/lib
Log files
~/Migrator/Logs/migrator.log
Steps
Install Relational Migrator
Download the latest
.deb
binary from the release page.Update the system package manager repositories:
sudo apt update (For headless Linux distributions) Create the required directories:
sudo mkdir /usr/share/desktop-directories/ Install Relational Migrator.
sudo apt install ./mongodb-relational-migrator_<version_number>-1_amd64.deb (Optional) To connect to Oracle or MySQL drivers, download and place the drivers into your Relational Migrator directory.
To download and install MySQL or Oracle drivers, see the following:
Copy the driver files to
/opt/mongodb-relational-migrator/lib/app/lib
.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
For more information, see Install on a Local Machine.
Change the directory to the Relational Migrator
/bin
location and start the application.cd /opt/mongodb-relational-migrator/bin ./mongodb-relational-migrator Enable Relational Migrator to run as an unattended standalone server.
In your
user.properties
file, uncommentspring.profiles.active: unattended
.(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 TLS/SSL Configuration Properties.
(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 theserver.port
line in youruser.properties
file to specify your preferred port. For example, you may wish to use port80
for HTTP or port443
for HTTPS.Run Relational Migrator using the binary.
The
bin
directory path is/opt/mongodb-relational-migrator/bin
. To run Relational Migrator using the binary, run the following:cd /opt/mongodb-relational-migrator/bin ./mongodb-relational-migrator (Optional) Check logs for errors or other information.
The logs are located in
~/Migrator/Logs/migrator.log
.When running Relational Migrator as a system service, the path is under the service user’s home directory.
Run as a System Service
When you install Relational Migrator on a Debian 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.
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 Reload
systemd
to read the newly-created service.systemctl daemon-reload Enable the Relational Migrator service to automatically start when the server starts.
You can manage the service with the following
systemctl
commands:systemctl enable migrator.service systemctl start migrator.service
Troubleshooting
If your installation fails with an error, use the following command to see error details:
sudo dpkg -i ./mongodb-relational-migrator_<version_number>-1_amd64.deb