一、下载MATLAB Runtime

https://ww2.mathworks.cn/products/compiler/matlab-runtime.html

二、解压缩并安装

yum install -y mesa-libGL libXmu
#CentOS需要安装缺乏的依赖

./install -mode silent -agreeToLicense yes

三、添加环境变量

安装完成后会提供一个环境变量,将其添加到/root/.bashrc中。

# MATLAB-RUNTIME
export LD_LIBRARY_PATH=/usr/local/MATLAB/MATLAB_Runtime/v93/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v93/bin/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v93/sys/os/glnxa64:$LD_LIBRARY_PATH

安装输出

[root@iZuf6927teqwjwvbddo06fZ mcr]# ./install -mode silent -agreeToLicense yes
Preparing installation files ...
Installing ...
(Jan 04, 2022 16:34:30) ##################################################################
(Jan 04, 2022 16:34:30) #
(Jan 04, 2022 16:34:30) # Today's Date: 
(Jan 04, 2022 16:34:30) Tue Jan 04 16:34:30 CST 2022
(Jan 04, 2022 16:34:30) 
(Jan 04, 2022 16:34:30) System Info
(Jan 04, 2022 16:34:30) OS: Linux 3.10.0-1160.45.1.el7.x86_64
(Jan 04, 2022 16:34:30) Arch: amd64
(Jan 04, 2022 16:34:30) Data Model: 64
(Jan 04, 2022 16:34:30) Language: en
(Jan 04, 2022 16:34:30) Java Vendor: Oracle Corporation
(Jan 04, 2022 16:34:30) Java Home: /tmp/mathworks_26026/sys/java/jre/glnxa64/jre
(Jan 04, 2022 16:34:30) Java Version: 1.8.0_121
(Jan 04, 2022 16:34:30) Java VM Name: Java HotSpot(TM) 64-Bit Server VM
(Jan 04, 2022 16:34:30) Java Class Path: /tmp/mathworks_26026/java/config/installagent/pathlist.jar
(Jan 04, 2022 16:34:30) User Name: root
(Jan 04, 2022 16:34:30) Current Directory: /tmp/mathworks_26026
(Jan 04, 2022 16:34:30) Input arguments: 
(Jan 04, 2022 16:34:30) root /opt/src/mcr
(Jan 04, 2022 16:34:30) libdir /tmp/mathworks_26026
(Jan 04, 2022 16:34:30) mode silent
(Jan 04, 2022 16:34:30) agreeToLicense yes
(Jan 04, 2022 16:34:30) standalone true
(Jan 04, 2022 16:34:30) connectionMode OFFLINE_ONLY
(Jan 04, 2022 16:34:31) Starting local product/component search in download directory
(Jan 04, 2022 16:34:31) Searching for archives...
(Jan 04, 2022 16:34:31) Reading /opt/src/mcr/archives
(Jan 04, 2022 16:34:31) Assembling product list...
(Jan 04, 2022 16:34:31) 1569 files found in /opt/src/mcr/archives
(Jan 04, 2022 16:34:31) Reading /opt/src/mcr
(Jan 04, 2022 16:34:31) 8 files found in /opt/src/mcr
(Jan 04, 2022 16:34:31) Archive search complete.  1577 total files found.
(Jan 04, 2022 16:34:32) Completed local product/component search
(Jan 04, 2022 16:34:32) Starting local product/component search in download directory
(Jan 04, 2022 16:34:32) Searching for archives...
(Jan 04, 2022 16:34:32) /usr/local/MATLAB/MATLAB_Runtime/v93/archives doesn't exist ... skipping.
(Jan 04, 2022 16:34:32) Archive search complete.  0 total files found.
(Jan 04, 2022 16:34:32) Completed local product/component search
(Jan 04, 2022 16:34:32) Installing Product: MATLAB Runtime - Builder JA 9.3
(Jan 04, 2022 16:34:35) Installing Product: MATLAB Runtime - Core 9.3
(Jan 04, 2022 16:35:03) Installing Product: MATLAB Runtime - GPU 9.3
(Jan 04, 2022 16:35:21) Installing Product: MATLAB Runtime - Hadoop And Spark 9.3
(Jan 04, 2022 16:35:25) Installing Product: MATLAB Runtime - NET And XL 9.3
(Jan 04, 2022 16:35:25) Installing Product: MATLAB Runtime - Numerics 9.3
(Jan 04, 2022 16:35:33) Notes: 
On the target computer, append the following to your LD_LIBRARY_PATH environment variable:

/usr/local/MATLAB/MATLAB_Runtime/v93/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v93/bin/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v93/sys/os/glnxa64:

If MATLAB Runtime is to be used with MATLAB Production Server, you do not need to modify the above environment variable.

(Jan 04, 2022 16:35:33) Exiting with status 0
(Jan 04, 2022 16:35:33) End - Successful.
Finished

四、注意事项

4.1 JDK
如使用centos建议使用open jdk 1.8

yum install java-1.8.0-openjdk

标签: none

添加新评论