第 5 步:安装 Amazon DMS 代理 - Amazon Database Migration Service
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 Amazon Web Services 服务入门

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

第 5 步:安装 Amazon DMS 代理

使用步骤 2 中的计算机 #2(连接)(已在其中安装 Edge 客户端和 ODBC 驱动程序)安装和配置 Amazon DMS 代理。这些区域有:Amazon DMS代理作为部分提供Amazon SCT安装程序包中介绍了AmazonSchema Conversion Tool 用户指南.

完成此步骤后,您应已准备好两台本地计算机:

  • 安装了 Amazon SCT 的计算机 #1 (SCT)

  • 安装了 Edge 客户端、ODBC 驱动程序和 DMS 代理的计算机 #2(连接)

安装 Amazon DMS 代理

  1. 在 Amazon SCT 安装目录中,找到名为 aws-schema-conversion-tool-dms-agent-X.X.X-XX.x86_64.rpm 的 RPM 文件。

    将该文件复制到计算机 #2(连接),即 Amazon DMS 代理计算机。SCT 和 DMS 代理应安装在独立的计算机上。Amazon DMS代理应位于 Edge 客户端和 ODBC 驱动程序所在的同一计算机上。

  2. 在计算机 #2(连接)上,运行以下命令以安装 DMS 代理。要简化权限,请以 root 用户身份运行此命令。

    sudo rpm -i aws-schema-conversion-tool-dms-agent-X.X.X-XX.x86_64.rpm

    此命令使用默认安装位置 /opt/amazon/aws-schema-conversion-tool-dms-agent。要将 DMS 代理安装到不同位置,请使用以下选项。

    sudo rpm --prefix installation_directory -i aws-schema-conversion-tool-dms-agent-X.X.X-XX.x86_64.rpm
  3. 要验证 Amazon DMS 代理是否正在运行,请使用以下命令。

    ps -ef | grep repctl

    该命令的输出应显示正在运行两个进程。

    要配置 Amazon DMS 代理,您必须提供密码和端口号。稍后,您将使用密码向 Amazon SCT 注册 Amazon DMS 代理,因此,请妥善保管。选取一个供 Amazon SCT 代理用来侦听 Amazon DMS 连接的未使用的端口号。您可能需要将防火墙配置为允许连接。

    现在,使用 configure.sh 脚本配置 Amazon DMS 代理。

    sudo /opt/amazon/aws-schema-conversion-tool-dms-agent/bin/configure.sh

    此时将出现以下提示。输入密码。在系统提示时,再次输入密码以进行确认。

    Configure the Amazon Schema Conversion Tool DMS Agent server Note: you will use these parameters when configuring agent in Amazon Schema Conversion Tool Please provide password for the server Use minimum 8 and up to 20 alphanumeric characters with at least one digit and one capital case character Password:

    输出如下所示。提供一个端口号。

    chown: missing operand after 'amazon:amazon' Try 'chown --help' for more information. /opt/amazon/aws-schema-conversion-tool-dms-agent/bin/repctl: /opt/amazon/aws-schema-conversion-tool-dms-agent/lib/libcom_err.so.3: no version information available (required by /opt/amazon/aws-schema-conversion-tool-dms-agent/lib/libgssapi_krb5.so.2) /opt/amazon/aws-schema-conversion-tool-dms-agent/bin/repctl: /opt/amazon/aws-schema-conversion-tool-dms-agent/lib/libcom_err.so.3: no version information available (required by /opt/amazon/aws-schema-conversion-tool-dms-agent/lib/libkrb5.so.3) [setserverpassword command] Succeeded Please provide port number the server will listen on (default is 3554) Note: you will have to configure your firewall rules accordingly Port:

输出如下所示,并确认该服务已启动。

Starting service... /opt/amazon/aws-schema-conversion-tool-dms-agent/bin/repctl: /opt/amazon/aws-schema-conversion-tool-dms-agent/lib/libcom_err.so.3: no version information available (required by /opt/amazon/aws-schema-conversion-tool-dms-agent/lib/libgssapi_krb5.so.2) /opt/amazon/aws-schema-conversion-tool-dms-agent/bin/repctl: /opt/amazon/aws-schema-conversion-tool-dms-agent/lib/libcom_err.so.3: no version information available (required by /opt/amazon/aws-schema-conversion-tool-dms-agent/lib/libkrb5.so.3) AWS Schema Conversion Tool DMS Agent was sent a stop signal AWS Schema Conversion Tool DMS Agent is no longer running [service command] Succeeded /opt/amazon/aws-schema-conversion-tool-dms-agent/bin/repctl: /opt/amazon/aws-schema-conversion-tool-dms-agent/lib/libcom_err.so.3: no version information available (required by /opt/amazon/aws-schema-conversion-tool-dms-agent/lib/libgssapi_krb5.so.2) /opt/amazon/aws-schema-conversion-tool-dms-agent/bin/repctl: /opt/amazon/aws-schema-conversion-tool-dms-agent/lib/libcom_err.so.3: no version information available (required by /opt/amazon/aws-schema-conversion-tool-dms-agent/lib/libkrb5.so.3) AWS Schema Conversion Tool DMS Agent was started as PID 1608

我们建议您安装 Amazon Command Line Interface (Amazon CLI)。通过使用 Amazon CLI,您可以询问 Amazon Snowball Edge 以查看写入到设备中的数据文件。您将Amazon从 Edge 中检索到的访问 Edge 设备的凭证。例如,您可以运行以下命令。

aws s3 ls --profile SnowballEdge --endpoint https://192.0.2.0 :8080 bucket-name --recursive

此命令将生成以下输出。

2018-08-20 10:55:31 53074692 streams/load00000001000573E166ACF4C0/00000001.fcd.gz 2018-08-20 11:14:37 53059667 streams/load00000001000573E166ACF4C0/00000002.fcd.gz 2018-08-20 11:31:42 53079181 streams/load00000001000573E166ACF4C0/00000003.fcd.gz

要停止 Amazon DMS 代理,请在 /opt/amazon/aws-schema-conversion-tool-dms-agent/bin 目录中运行以下命令。

./aws-schema-conversion-tool-dms-agent stop

要启动 Amazon DMS 代理,请在 /opt/amazon/aws-schema-conversion-tool-dms-agent/bin 目录中运行以下命令。

./aws-schema-conversion-tool-dms-agent start