文档菜单
文档首页
/
关系型迁移器
/ / /

在 Debian 上安装

本页内容

  • 步骤
  • 下一步
  • 了解更多

您可以在 Debian 服务器上安装 Relational Migrator。此安装方法允许 Relational Migrator 在无人值守的服务器上运行。通过在无人值守的服务器上运行,Relational Migrator 可绑定到服务器上的任何 IP 地址和端口,并以 Web 应用程序的形式暴露出来。

  1. 下载最新版本从发行页面下载最新的.deb 二进制文件.

  2. 安装 Relational Migrator。

    sudo apt install ./mongodb-relational-migrator_X.X.X-1_amd64.deb
  3. (可选) 要连接到 Oracle 或 MySQL 驱动程序,请下载并将驱动程序放入您的 Relational Migrator 目录。

    1. 要下载和安装 MySQL 或 Oracle 驱动程序,请参阅以下内容

    2. 将驱动程序文件复制到 /opt/mongodb-relational-migrator/lib/app/lib

      要复制驱动程序,请使用以下示例

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

    有关更多信息,请参阅在本地计算机上安装.

  4. 将目录更改到 Relational Migrator 的 /bin 位置并启动应用程序。

    cd /opt/mongodb-relational-migrator/bin
    ./mongodb-relational-migrator
  5. 启用 Relational Migrator 以无人值守独立服务器模式运行。

    在您的 user.properties 文件中,取消注释 spring.profiles.active: unattended

  6. (可选) 更新 TLS/SSL 配置属性。

    在您的 user.properties 文件中,取消注释并更新 TLS/SSL 配置属性。

    建议在无人值守服务器安装中补充 TLS/SSL 配置,因为 Relational Migrator 可以绑定到服务器上的任何 IP 地址和端口。有关更多信息,请参阅 TLS/SSL 配置属性。

  7. (可选) 更新 Relational Migrator 运行的端口。

    默认情况下,关系迁移器配置为在端口8278上运行。要更改关系迁移器运行的端口(例如,将端口更改为80以用于HTTP或443以用于HTTPS),请更新您的 user.properties 文件中的 server.port 行,以指定您首选的端口。

  8. 使用二进制文件运行关系迁移器。

    通常可以在 /opt/mongodb-relational-migrator/bin 找到 bin 目录。要使用二进制文件运行关系迁移器,请运行以下命令:

    cd /opt/mongodb-relational-migrator/bin
    ./mongodb-relational-migrator
  9. (可选)检查日志以查找错误或其他信息。

    • 日志位于 ~/Migrator/Logs/migrator.log

    • 当将关系迁移器作为系统服务运行时,路径位于服务用户的家目录下。

返回

Debian 系统