在网上可以直接搜到,这里就不给到链接了。
新建一个文件夹,存放Matlab镜像
mkdir MATLAB
sudo apt-get install p7zip-full p7zip-rar
7z x R2018b_glnxa64_dvd1.iso //这两个文件放在MATLAB中
7z x R2018b_glnxa64_dvd1.iso
过程中会遇到以下问题:
返回上一层,新建一个文件夹,供安装matlab使用
cd ..
mkdir matlab
cd matlab
下面这段不一定有用,先留着
*********************************
把installer_input.txt 和activate.ini拷贝进来
然后修改activate.ini:
isSilent=true //开启silent模式
activateCommand=activateOffline //设置激活方式, 离线激活 无需联网
licenseFile=/matlab/etc/lic_standalone.lic //license文件位置
修改installer_input.txt
destinationFolder= /autodl-tmp/matlab/R2018b //安装目录
fileInstallationKey= 38699-60149-36808-21840-05491 //你的序列号
agreeToLicense=yes //同意协议
outputFile=/tmp/mathwork_install.log //安装日志 (Optional)
mode=silent //开启无人值守安装
activationPropertiesFile=/autodl-tmp/matlab/activate.ini //激活文件
***********************************
然后执行
sudo ./install -mode silent -agreeToLicense yes -fileInstallationKey 40236-45817-26714-51426-39281 -destinationFolder /a/root/autodl-tmp/matlab/R2018 -activationPropertiesFile /root/autodl-tmp/matlab/activate.ini -inputFile /root/autodl-tmp/matlab/installer_input.txt
安装无反应的话,chmod -R 777 MATLAB
因为是服务器,所以要加root路径
-inputFile 这块有时候会出错,可以去掉
上面出错的话,可以运行下面这句
~/autodl-tmp/MATLAB# ./install -mode silent -agreeToLicense yes -fileInstallationKey 09806-07443-53955-64350-21751-41297 -destinationFolder /root/autodl-tmp/matlab/RR -inputFile ./installer_input.txt
RR 为安装目录
两个完整文件如下():
activate.ini
##################################################################
#
# Name: activate.ini
#
# Copyright 2008-2010 The MathWorks, Inc.
#
# Purpose: Activation application initialization file template.
# Use this file to specify parameters required by the activation
# application at runtime. This file provides the activation
# application with required input without using the GUI.
#
# INSTRUCTIONS FOR RUNNING IN SILENT MODE
#
# To run the activation application in silent mode:
#
# 1. Create a copy of this template file and fill in the required
# information.
#
# 2. Navigate to the folder containing the activation application.
# (Windows) $MATLABROOT\bin\$ARCH
# (Mac/Linux) $MATLABROOT/bin
#
# 3. Launch the activation application from the command line,
# using the -propertiesFile option to specify the name of your
# activation initialization file.
#
# (Windows) activate_matlab.exe -propertiesFile
# (Mac/Linux) activate_matlab.sh -propertiesFile
#
# NOTE: If you want to perform silent activation automatically
# after performing silent installation, specify the name of your
# activation initialization file as the value of the
# activationPropertiesFile= option in the installer initialization
# file (installer_input.txt). This option causes the installer
# to launch the activation application in silent mode. You can
# also specify the activation initialization file as an argument
# when you launch the installer, using the -activationPropertiesFile
# option.
#
# NOTE: When run in silent mode, the activation application does
# not display the activation dialog boxes.
#
##################################################################
#
# SPECIFY ACTIVATION MODE
#
# Specify whether or not to run in silent mode.
#
# Valid values: true / false
#
# Default: isSilent=true.
isSilent=true
#
# SPECIFY ACTIVATION TYPE (Required)
#
# Specify the type of activation you want to do.
#
# Valid values: activateDcAnon / activateOffline
activateCommand=activateOffline
#
# SPECIFY LICENSE FILE LOCATION (Required if activateCommand=activateOffline)
#
# If you specified the activation type activateOffline, you
# must specify the location of the License File that you want
# to install.
#
# Mac/Linux example:
# licenseFile=/Central/license.dat
#
# Windows example:
# licenseFile=C:\license.dat
licenseFile=/autodl-tmp/matlab/MATLAB R2018b Linux64 Crack/license_standalone.lic
#
# SPECIFY ACTIVATION KEY (Required if activateCommand=activateDcAnon)
#
# If you specified the activation type activateDcAnon,you must
# specify a valid Activation Key.
#
# Example: activationKey=55555-55555-55555-55555
#activationKey=
#
# SPECIFY LICENSE FILE DESTINATION DIRECTORY (Optional)
#
# Specify the directory into which you want to install the license file.
# You must specify the full path of a directory that already exists.
#
# NOTE: This option is only for advanced users since it could make MATLAB
# unable to start without specifying special options.
#
# Mac/Linux example:
# installLicenseFileDir=/Central/LicenseDirectory
#
# Windows examples:
# installLicenseFileDir=C:\License Directory
#installLicenseFileDir=
#
# SPECIFY NAME OF INSTALLED LICENSE FILE (Optional)
#
# Specify the name of the installed License File. The file name
# must have with either .lic or .dat file extension.
#
# Example: installLicenseFileName=license.dat
installLicenseFileName=/autodl-tmp/matlab/MATLAB R2018b Linux64 Crack/license_standalone.lic
installer_input.txt(这个直接打不开,可以使用vim)
##################################################################
##
## 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
## (Mac/Unix) install -inputFile
##
## NOTE:
## If you want to run the activation application in silent
## mode immediately after the installer completes, you must create
## an activation initialization file and specify its name as the
## value of the activationPropertiesFile= option. You can also
## pass the name of the activation initialization file to the
## installer using the -activationPropertiesFile command line
## option.
##
##################################################################
##
##
## SPECIFY INSTALLATION FOLDER
##
## Example:
## (Windows) destinationFolder=C:\Program Files\MATLAB\RXXXX
## (Unix) destinationFolder=/usr/local/RXXXX
## (Mac) destinationFolder=/Applications
##
## Set the desired value for destinationFolder and
## uncomment the line.
destinationFolder=/root/autodl-tmp/matlab/R2018b
##
## SPECIFY FILE INSTALLATION KEY
##
## Example: fileInstallationKey=xxxxx-xxxxx-xxxxx-xxxxx.....
##
## Set the desired value for fileInstallationKey and
## uncomment
fileInstallationKey=40236-45817-26714-51426-39281
##
## 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_.log
## (Unix/Mac) outputFile=/tmp/mathworks_.log
##
## Set the desired value for outputFile and
## uncomment the line.
# outputFile=
## SPECIFY INSTALLER MODE
##
## interactive: Run the installer GUI, waiting for user input on all
## dialog boxes.
##
## silent: Run the installer without displaying the GUI.
##
## automated: Run the installer GUI, displaying all dialog boxes, but only
## waiting for user input on dialogs that are missing required
## input.
##
## Set mode value to either interactive, silent, or automated and
## uncomment the line.
mode=silent
## SPECIFY LENGTH OF TIME DIALOG BOXES ARE DISPLAYED
##
## Specify how long the installer dialog boxes are displayed, in milliseconds.
##
## NOTE: Use this value only if you set the installer mode to automated.
##
## By default, the dialog boxes display on the screen for one second.
##
## Example: (To specify a value of 1 second.) automatedModeTimeout=1000
##
## Set the desired value for automatedModeTimeout and
## uncomment the line.
# automatedModeTimeout=
## SPECIFY ACTIVATION PROPERTIES FILE (For non-network license types only)
##
## Enter the path to an existing file that contains properties to configure
## the activation process.
activationPropertiesFile=/root/autodl-tmp/matlab/activate.ini
########## Begin: Options for Network License Types #########
##
## SPECIFY PATH TO LICENSE FILE (Required for network license types only)
##
## This value is required when installing either the License Manager or when
## installing as a Network End-User
## Example:
## (Windows) licensePath=C:\TEMP\license.dat
## (Unix) licensePath=/tmp/license.dat
## Set the desired value for licensePath and
## uncomment the line.
# licensePath=
## CHOOSE TO INSTALL LICENSE MANAGER (For network license types only)
##
## Installs license manager files to disk.
##
## NOTE: You only need to install the license manager files
## on your license server.
##
## Set lmgrFiles value to true or false and
## uncomment the line.
# lmgrFiles=
## INSTALL LICENSE MANAGER AS A SERVICE (For network license types only)
##
## Configure the license manager as a service on Windows.
##
## NOTE: Not applicable for Unix or Mac.
##
## NOTE: The lmgr_files option (set in previous step) must also be set to true.
##
## Set lmgrService value to true or false and
## uncomment the line.
# lmgrService=
########## 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=
##
## 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.
##
## Set desktopShortcut value to true or false and
## uncomment the line.
# desktopShortcut=
## 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.
##
## Set startMenuShortcut value to true or false and
## uncomment the line.
# startMenuShortcut=
## CREATE a MATLAB Startup Accelerator task
##
## The MATLAB Startup Accelerator installer creates a
## system task to preload MATLAB into the system<92>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=
## 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
################ 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.Aerospace_Blockset
#product.Aerospace_Toolbox
#product.Antenna_Toolbox
product.Audio_System_Toolbox
product.Automated_Driving_System_Toolbox
product.Bioinformatics_Toolbox
#product.Communications_Toolbox
product.Computer_Vision_System_Toolbox
#product.Control_System_Toolbox
product.Curve_Fitting_Toolbox
#product.DO_Qualification_Kit
#product.DSP_System_Toolbox
product.Data_Acquisition_Toolbox
product.Database_Toolbox
#product.Datafeed_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_HDL_Toolbox
#product.LTE_Toolbox
product.MATLAB
product.MATLAB_Coder
product.MATLAB_Compiler
product.MATLAB_Compiler_SDK
product.MATLAB_Distributed_Computing_Server
product.MATLAB_Production_Server
product.MATLAB_Report_Generator
product.Mapping_Toolbox
product.Model_Predictive_Control_Toolbox
product.Model_Based_Calibration_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_Code_Prover
#product.Powertrain_Blockset
#product.Predictive_Maintenance_Toolbox
#product.RF_Blockset
#product.RF_Toolbox
#product.Risk_Management_Toolbox
#product.Robotics_System_Toolbox
#product.Robust_Control_Toolbox
#product.Sensor_Fusion_and_Tracking_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_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.Spreadsheet_Link
#product.Stateflow
product.Statistics_and_Machine_Learning_T
product.Wavelet_Toolbox
将Crack中的license_server.lic,license_standalone.lic,放入到安装路径RR中的licenses文件夹中,然后将Linux\MATLAB_R2018b_Linux64_Crack\MATLAB R2018b Linux64 Crack\R2018b\bin\glnxa64\matlab_startup_plugins\lmgrimpl\libmwlmgrimpl.so也拷入相应路径下
运行
~/autodl-tmp/matlab/RR/bin/glnxa64# ./MATLAB
PS:
matlab2018b有个问题就是gcc的版本有点问题,有些matlab函数不能直接使用,可以按照以上步骤安装matlab2020a,亲测可用!