MATLAB :【12】手把手教你在Linux以命令行方式(静默方式 非图形化方式)安装MATLAB(正版
2401_83947105 2024-07-29 17:37:03 阅读 92
1 环境介绍
2 Linux安装MATLAB
2.1 下载对应MATLAB版本
2.2 服务器配置
2.3 MATLAB安装
2.4 MATLAB测试
2.5 配置环境变量
3 参考博客
1 环境介绍
我的服务器系统是Linux的Ubuntu并且没有非图形界面。
所安装的版本是MATLAB的R2021a Linux版本,并且使用非图形界面进行启动。
下面具体介绍安装过程~
2 Linux安装MATLAB
2.1 下载对应MATLAB版本
如果是T大的同学可以直接在学校网站下载对应的Linux版本即可,或者可以在网络上找到合适的安装包。
如果是安装到服务器,可以使用xftp将文件上传到 cd ~ 目录下。
或者本地可以直接使用U盘即可。
同时也要同步上传network.lic这个文件,一并放在同一个目录下。
对于T大同学来说,可以在网站的这个地方找到:
打开后包含如下内容,里面就包含了所需的lic文件。
将network.lic也上传到根目录:
同时需要保存好MATLAB安装序列号,T大的在sn.txt文件中,之后会用到。
2.2 服务器配置
使用SSH连接服务器(本地Linux可以忽略),之后进入命令行操作
更新软件库:apt-get update
安装sudo:apt-get install sudo
升级apt-get:sudo apt-get upgrade
注意这一步比较慢(5-10min)
保持旧版本,选2:
输入:sudo apt-get install build-essential
输入:sudo apt-get install yum
选Y
检测yum是否安装成功,输入yum
出现下面表示成功
安装解压缩软件:sudo apt install p7zip-full p7zip-rar
输入Y:
安装x11库:sudo apt-get install -y libx11-dev
安装库:sudo apt-get install xorg-dev
输入Y
至此,就完成了服务器环境的一些配置,之后可以开始安装MATLAB了!
2.3 MATLAB安装
进入根目录:cd ~
查看文件:ls
新建matlab文件夹:mkdir matlab
解压ISO文件到matlab目录:7z x R2021a_Linux.iso -o./matlab
查看解压后的文件
进入目录:cd matlab/
查看文件:ls
出现上述的内容,证明解压成功。
回到根目录:cd ~
创建安装目录:mkdir ~/Matlab_R2021a
创建安装配置文件:touch ~/installer_input.txt
编辑配置文件:vim ~/installer_input.txt
输入i进入编辑模式
在里面输入以下内容:
<code>##################################################################
##
## Use this file to specify parameters required by the installer at runtime.
##
## Instructions for using this file.
##
## 1. Create a copy of this template file and fill in the required
## information.
##
## 2. Uncomment only those lines that start with a single '#'
## and set the desired values. All allowed values for the
## parameters are defined in the comments section for each
## parameter.
##
## 3. Launch the installer from the command line, using the -inputFile option
## to specify the name of your installer initialization file.
##
## (Windows) setup.exe -inputFile <file_name>
## (Linux/macOS) install -inputFile <file_name>
##
##################################################################
##
##
## SPECIFY INSTALLATION FOLDER
##
## Example:
## (Windows) destinationFolder=C:\Program Files\MATLAB\RXXXX
## (Linux) destinationFolder=/usr/local/RXXXX
## (macOS) destinationFolder=/Applications
##
## Set the desired value for destinationFolder and
## uncomment the line.
destinationFolder=/root/Matlab_R2021a
##
## SPECIFY FILE INSTALLATION KEY
##
## Example: fileInstallationKey=xxxxx-xxxxx-xxxxx-xxxxx.....
##
## Set the desired value for fileInstallationKey and
## uncomment the line.
##
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
##
## ACCEPT LICENSE AGREEMENT
##
## You must agree to the license agreement to install MathWorks products.
## The license agreement can be found in the license_agreement.txt file at the
## root level of the installation DVD.
##
## Example: agreeToLicense=yes
##
## Set agreeToLicense value to yes or no and
## uncomment the line.
agreeToLicense=yes
##
## SPECIFY OUTPUT LOG
##
## Specify full path of file into which you want the results of the
## installation to be recorded.
##
## Example:
## (Windows) outputFile=C:\TEMP\mathworks_<user_name>.log
## (Linux/macOS) outputFile=/tmp/mathworks_<user_name>.log
##
## Set the desired value for outputFile and
## uncomment the line.
outputFile=/root/matlab_install.log
##
## Enable Login Named User licensing
##
## Set to Yes to enable use of a Login Named User license for all users of this MATLAB installation
## Users must log in to their MathWorks Account when MATLAB starts.
##
## Example: enableLNU=yes
##
## NOTE: This flag is valid in silent installations only.
# enableLNU=yes
##
## IMPROVE MATLAB
##
## Improve MATLAB by sending user experience information to MathWorks.
## Your participation ensures that you are represented and helps us design
## better products. You can opt in or out of this service either during
## installation or by going to MATLAB preferences.
## https://www.mathworks.com/support/faq/user_experience_information_faq.html
improveMATLAB=yes
########## Begin: Options for Network License Types #########
##
## SPECIFY PATH TO LICENSE FILE (Required for network license types only)
##
## This value is required when installing as a Network End-User
## Example:
## (Windows) licensePath=C:\TEMP\license.dat
## (Linux) licensePath=/tmp/license.dat
## Set the desired value for licensePath and
## uncomment the line.
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
**自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。**
**深知大多数Linux运维工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则几千的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!**
**因此收集整理了一份《2024年Linux运维全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。**
![img](https://img-blog.csdnimg.cn/img_convert/587a032f95d72ed5fc8a747d6a736a11.png)
![img](https://img-blog.csdnimg.cn/img_convert/1ef0896a2f9d277a43d7268931ef6d2a.png)
![img](https://img-blog.csdnimg.cn/img_convert/a55a7362dddd4bfcba2f393bf42492a7.png)
![img](https://img-blog.csdnimg.cn/img_convert/56e993cfbe46c09fe6fb1be2c6b264b5.png)
![img](https://img-blog.csdnimg.cn/img_convert/03b48db4b19f02901c50e3fc9e68001b.png)
**既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Linux运维知识点,真正体系化!**
**由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新**
**如果你觉得这些内容对你有帮助,可以添加VX:vip1024b (备注Linux运维获取)**
![img](https://img-blog.csdnimg.cn/img_convert/ecf6d8e2e70079d1d6027368b3feb7b4.jpeg)
了一份《2024年Linux运维全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。**
[外链图片转存中...(img-0tZp0gjE-1712850316142)]
[外链图片转存中...(img-70PO77Um-1712850316143)]
[外链图片转存中...(img-UKYw6PLK-1712850316143)]
[外链图片转存中...(img-fEzh0Hj8-1712850316143)]
[外链图片转存中...(img-4DDmh39f-1712850316144)]
**既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Linux运维知识点,真正体系化!**
**由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新**
**如果你觉得这些内容对你有帮助,可以添加VX:vip1024b (备注Linux运维获取)**
[外链图片转存中...(img-fSoiYZ51-1712850316144)]
上一篇: 【网络】socket套接字基础知识
本文标签
声明
本文内容仅代表作者观点,或转载于其他网站,本站不以此文作为商业用途
如有涉及侵权,请联系本站进行删除
转载本站原创文章,请注明来源及作者。