近期在Linux服务器上安装Matlab2020a,走了不少弯路。我将有效步骤记录如下,希望能帮助到大家。
1. 在网上找到Matlab2020a安装资源包(Linux版本),或利用教育系统资源下载免费正版,或购买正版。将安装包(iso镜像)上传到服务器端。
2. 挂载Matlab镜像,其中/mnt/matlab是镜像会挂载的位置。
mkdir /mnt/matlab
mount -o loop /home/镜像iso文件所在位置/R2020a_Linux.iso /mnt/matlab
可视化方法
3. 启动可视化安装
cd /mnt/matlab
./install
如果正确,会出现以下页面,选择右上角Advanced Options-I have a File Installation Key,点同意协议,并输入安装密钥(File Installation Key):09806-07443-53955-64350-21751-41297。安装密钥在网上较容易找到。
4.选择合适的安装位置。
5. 选择许可证文件(Select License File),可通过正版渠道或网络购买获得,是一个.lic文件。
6. 选择需要安装整个Matlab的所有工具(30G左右)还是仅Matlab(3G左右)。
7. 安装完成后,需要激活密钥进行激活。
· 可视化安装参考链接:
1. 从零开始在linux服务器设置matlab-1.安装matlab_linux安装matlab-CSDN博客
2. LINUX系统SSH连接安装Matlab、添加环境变量、后台运行Matlab脚本_如何在服务器上跑matlab程序-CSDN博客
非可视化方法
3. 执行下列命令
mkdir /mnt/Matlab_R2020a #创建matlab安装目录
touch /mnt/installer_input.txt #创建安装配置文件
4. 编辑配置文件
执行下列命令或直接打开修改。
vim /mnt/installer_input.txt
修改文件内容为:
destinationFolder=/mnt/Matlab_R2020a #安装目标文件夹
fileInstallationKey=09806-07443-53955-64350-21751-41297?-26918-26782-54088 #文件安装密钥
agreeToLicense=yes #同意许可
outputFile=/mnt/matlab_install.log #安装日志输入文件
licensePath=home/zqh/agileesofd_SSQ.lic #许可证目录
5. 开始安装
sudo chmod 444 /mnt/installer_input.txt #修改安装配置文件的权限
cd /mnt/matlab
chmod a+x -R ./*
cd /mnt/Matlab_R2020a
chmod a+x -R ./
sudo /mnt/matlab/install -inputFile ./installer_input.txt
6. 取消挂载
sudo umount /mnt/matlab #取消挂载
配置文件的完整格式为:
destinationFolder=/root/Matlab_R2021a
fileInstallationKey=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
agreeToLicense=yes
outputFile=/root/matlab_install.log
improveMATLAB=yes
licensePath=/root/network.lic
########## End: Options for Network License Types #########
################# Begin - Windows Only Options ################
##
## CHOOSE TO SET FILE ASSOCIATIONS
##
## Set to true if you want the installer to associate file types used by MathWorks
## products to this version of MATLAB, or false if you do not want the installer to
## associate MathWorks file types with this version of MATLAB.
##
## Default value is true.
##
## Set setFileAssoc value to true or false and
## uncomment the line.
# setFileAssoc=true
##
## CHOOSE TO CREATE WINDOWS DESKTOP SHORTCUT
##
## Set to true if you would like the installer to create a desktop shortcut icon
## when MATLAB is installed or false if you don't want the shortcut created.
##
## Default value is false.
##
## Set desktopShortcut value to true or false and
## uncomment the line.
# desktopShortcut=false
## CHOOSE TO ADD SHORTCUT TO WINDOWS START MENU
##
## Set to true if you would like the installer to create a Start Menu shortcut
## icon when MATLAB is installed or false if you don't want the shortcut created.
##
## Default value is true.
##
## Set startMenuShortcut value to true or false and
## uncomment the line.
# startMenuShortcut=true
## CREATE a MATLAB Startup Accelerator task
##
## The MATLAB Startup Accelerator installer creates a
## system task to preload MATLAB into the system's cache
## for faster startup.
##
## NOTE: By default, a MATLAB Startup Accelerator task will
## automatically be created.
##
## If you want a MATLAB Startup Accelerator task to be created,
## do not edit this section.
##
## Set createAccelTask value to false if you do not want to
## create an Accelerator task and uncomment the line.
# createAccelTask=true
################ End - Windows Only Options ################
## SPECIFY PRODUCTS YOU WANT TO INSTALL
##
## By default, the installer installs all the products and
## documentation for which you are licensed. Products you are not licensed for
## are not installed, even if they are listed here.
##
## Note:
## 1. To automatically install all your licensed products, do not edit
## any lines in this section.
##
## 2. To install a specific product or a subset of products for
## which you are licensed, uncomment the line for the product(s) you want
## to install.
#product.5G_Toolbox
#product.AUTOSAR_Blockset
#product.Aerospace_Blockset
#product.Aerospace_Toolbox
#product.Antenna_Toolbox
#product.Audio_Toolbox
#product.Automated_Driving_Toolbox
#product.Bioinformatics_Toolbox
#product.Communications_Toolbox
#product.Computer_Vision_Toolbox
#product.Control_System_Toolbox
#product.Curve_Fitting_Toolbox
#product.DDS_Blockset
#product.DO_Qualification_Kit
#product.DSP_System_Toolbox
#product.Data_Acquisition_Toolbox
#product.Database_Toolbox
#product.Datafeed_Toolbox
#product.Deep_Learning_HDL_Toolbox
#product.Deep_Learning_Toolbox
#product.Econometrics_Toolbox
#product.Embedded_Coder
#product.Filter_Design_HDL_Coder
#product.Financial_Instruments_Toolbox
#product.Financial_Toolbox
#product.Fixed-Point_Designer
#product.Fuzzy_Logic_Toolbox
#product.GPU_Coder
#product.Global_Optimization_Toolbox
#product.HDL_Coder
#product.HDL_Verifier
#product.IEC_Certification_Kit
#product.Image_Acquisition_Toolbox
#product.Image_Processing_Toolbox
#product.Instrument_Control_Toolbox
#product.LTE_Toolbox
#product.Lidar_Toolbox
#product.MATLAB
#product.MATLAB_Coder
#product.MATLAB_Compiler
#product.MATLAB_Compiler_SDK
#product.MATLAB_Parallel_Server
#product.MATLAB_Production_Server
#product.MATLAB_Report_Generator
#product.MATLAB_Web_App_Server
#product.Mapping_Toolbox
#product.Mixed-Signal_Blockset
#product.Model_Predictive_Control_Toolbox
#product.Model-Based_Calibration_Toolbox
#product.Motor_Control_Blockset
#product.Navigation_Toolbox
#product.OPC_Toolbox
#product.Optimization_Toolbox
#product.Parallel_Computing_Toolbox
#product.Partial_Differential_Equation_Toolbox
#product.Phased_Array_System_Toolbox
#product.Polyspace_Bug_Finder
#product.Polyspace_Bug_Finder_Server
#product.Polyspace_Code_Prover
#product.Polyspace_Code_Prover_Server
#product.Powertrain_Blockset
#product.Predictive_Maintenance_Toolbox
#product.RF_Blockset
#product.RF_Toolbox
#product.ROS_Toolbox
#product.Radar_Toolbox
#product.Reinforcement_Learning_Toolbox
#product.Risk_Management_Toolbox
#product.Robotics_System_Toolbox
#product.Robust_Control_Toolbox
#product.Satellite_Communications_Toolbox
#product.Sensor_Fusion_and_Tracking_Toolbox
#product.SerDes_Toolbox
#product.Signal_Processing_Toolbox
#product.SimBiology
#product.SimEvents
#product.Simscape
#product.Simscape_Driveline
#product.Simscape_Electrical
#product.Simscape_Fluids
#product.Simscape_Multibody
#product.Simulink
#product.Simulink_3D_Animation
#product.Simulink_Check
#product.Simulink_Code_Inspector
#product.Simulink_Coder
#product.Simulink_Compiler
#product.Simulink_Control_Design
#product.Simulink_Coverage
#product.Simulink_Design_Optimization
#product.Simulink_Design_Verifier
#product.Simulink_Desktop_Real-Time
#product.Simulink_PLC_Coder
#product.Simulink_Real-Time
#product.Simulink_Report_Generator
#product.Simulink_Requirements
#product.Simulink_Test
#product.SoC_Blockset
#product.Spreadsheet_Link
#product.Stateflow
#product.Statistics_and_Machine_Learning_Toolbox
#product.Symbolic_Math_Toolbox
#product.System_Composer
#product.System_Identification_Toolbox
#product.Text_Analytics_Toolbox
#product.UAV_Toolbox
#product.Vehicle_Dynamics_Blockset
#product.Vehicle_Network_Toolbox
#product.Vision_HDL_Toolbox
#product.WLAN_Toolbox
#product.Wavelet_Toolbox
#product.Wireless_HDL_Toolbox
· 参考链接
1.https://blog.csdn.net/CoolCoolCarrot/article/details/108054178?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_utm_term~default-0-108054178-blog-129326929.235^v40^pc_relevant_3m_sort_dl_base3&spm=1001.2101.3001.4242.1&utm_relevant_index=3
2.https://blog.csdn.net/weixin_44987694/article/details/129341420?spm=1001.2101.3001.6650.2&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-2-129341420-blog-129326929.235%5Ev40%5Epc_relevant_3m_sort_dl_base3&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-2-129341420-blog-129326929.235%5Ev40%5Epc_relevant_3m_sort_dl_base3&utm_relevant_index=5
3. https://blog.csdn.net/Alex497259/article/details/129865457?spm=1001.2101.3001.6650.7&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-7-129865457-blog-129341420.235%5Ev40%5Epc_relevant_3m_sort_dl_base3&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-7-129865457-blog-129341420.235%5Ev40%5Epc_relevant_3m_sort_dl_base3&utm_relevant_index=14
以上便是安装的全过程。