1.挂载镜像
mount -o loop xxx/MATHWORKS_R2014A.iso /media/cdrom
2.创建安装目录
sudo mkdir -p /usr/local/matlab/etc
sudo mkdir -p /usr/local/matlab/2014a
3.安装
(1)移动配置文件
sudo cp /media/cdrom/installer_input.txt /usr/local/matlab/etc
sudo cp /media/cdrom/activate.ini /usr/local/matlab/etc
sudo cp xxx/Crack/installer_input.txt /usr/local/matlab/etc
sudo cp xxx/Crack/activate.ini /usr/local/matlab/etc
(2)修改配置文件
①修改文件属性
chmod +w /usr/local/matlab/etc/installer_input.txt
chmod +w /usr/local/matlab/etc/activate.ini
②修改installer_input.txt文件
destinationFolder=/usr/local/matlab/2014a #安装目录
fileInstallationKey= 12345-67890-12345-67890 #序列号,似乎可以随便写
agreeToLicense=yes #同意协议
outputFile=/tmp/mathwork_install.log #安装日志
mode=silent #开启无人值守安装
activationPropertiesFile=/usr/local/matlab/etc/activate.ini #激活文件
licensePath= /usr/local/matlab/etc/license_405329_R2014a.lic #license文件
③修改activate.ini文件
isSilent=true #开启silent模式</font>
activateCommand=activateOffline #设置激活方式, 离线激活 无需联网
licenseFile=/usr/local/matlab/etc/license_405329_R2014a.lic #license文件位置
④执行安装命令
sudo ./install -mode silent -fileInstallationKey 29797-39064-48306-32452 -agreeToLicense yes -activationPropertiesFile matlab2014a_for_Linux/Crack/license_405329_R2014a.lic -destinationFolder /usr/local/2014a
⑤破解
sudo cp Crack/Linux/libmwservices.so /usr/local//matlab/bin/glnxa64/
sudo /usr/local/matlab/2014a/bin/activate_matlab.sh -propertiesFile /usr/local/matlab/etc/activate.ini
⑥设置环境变量
export PATH=/usr/local/matlab/2014a/bin:$PATH
source /etc/profile