主要内容

本页采用了机器翻译。点击此处可查看最新英文版本。

配置服务器以使用 MATLAB Runtime

如果您在安装过程中没有将 MATLAB® Web App Server™ 配置为使用 MATLAB Runtime 版本,则可以使用 webapps-runtime 命令进行配置。然而,在配置服务器以使用 MATLAB Runtime 版本之前,请先验证您是否已安装该版本。

注意

MATLAB Web App Server 的每个版本都旨在支持六个 MATLAB Runtime 版本。此范围从与 MATLAB Web App Server 当前版本绑定的 MATLAB Runtime 版本开始,并延伸到之前的五个版本。有关详细信息,请参阅支持的 MATLAB Runtime 版本

安装 MATLAB Runtime

  1. 从 MathWorks® 网站或 MATLAB 桌面下载 MATLAB Runtime 安装程序。

    选项步骤
    MathWorks 网站

    从以下选项中选择适当的平台和特定于版本的安装程序:

    https://www.mathworks.com/products/compiler/matlab-runtime.html

    MATLAB 桌面

    在 MATLAB 命令提示符下,键入:

    compiler.runtime.download (MATLAB Compiler)

  2. 使用安装程序安装 MATLAB Runtime。有关安装说明,请参阅下载并安装 MATLAB Runtime (MATLAB Compiler)

配置服务器

要配置服务器以使用 MATLAB Runtime 版本:

  1. 导航到命令行脚本文件夹。

    操作系统命令行脚本的默认位置

    Windows® (管理员)

    C:\Program Files\MATLAB\MATLAB Web App Server\R2024b\script

    Linux® (sudo)

    /usr/local/MATLAB/MATLAB_Web_App_Server/R2024b/script

    macOS(Intel® 处理器)(sudo)

    /Applications/MATLAB/MATLAB_Web_App_Server/R2024b/script

  2. 使用 add 选项和 MATLAB Runtime 安装路径执行 webapps-runtime 命令。

    webapps-runtime add <Path to MATLAB Runtime installation>

另请参阅

主题