安装matlab
安装matlab
软件 | 版本 |
---|---|
matlab | 2022a |
节点 | IP | 系统 | 功能 | CPU | 内存 | 硬盘 |
---|---|---|---|---|---|---|
node1 | 10.80.0.100 | kylin v10-sp3 | matlab | 4核心 | 8GB | 100GB |
参考网址:
https://code84.com/770448.html
参考网址:
https://zhuanlan.zhihu.com/p/394298249
node1
上传相关软件包到root目录,校验数据:
1 | # md5sum -c CODE.md5 |
新建安装目录:
1 | # mkdir -p /usr/local/Matlab/{R2020a,license} |
新建挂载目录:
1 | # mkdir /mnt/matlab |
解压安装包:
1 | # tar -xzvf Matlab_R2020a_Lin64.tar.gz |
挂载镜像:
1 | # mount -r Matlab98R2020a_Lin64.iso /mnt/matlab |
创建安装配置文件:
1 | # tee /usr/local/Matlab/installer_input.txt &> /dev/null << EOF |
删除压缩包,确保安装目录剩余26.86g:
1 | # rm -rf /root/Matlab_R2020a_Lin64.tar.gz |
安装:
1 | # /mnt/matlab/install -inputFile /usr/local/Matlab/installer_input.txt |
查看日志:
1 | # tail -f /usr/local/Matlab/matlab_install.log |
卸载镜像:
1 | # umount /mnt/matlab/ |
删除挂载目录:
1 | # rm -rf /mnt/matlab/ |
复制license:
1 | # cp /root/Matlab_Crack/*.lic /usr/local/Matlab/license |
备份文件:
1 | # tar -czf /usr/local/Matlab/R2020a/bin/glnxa64/matlab_startup_plugins/lmgrimpl/libmwlmgrimpl.so.bak.tar.gz /usr/local/Matlab/R2020a/bin/glnxa64/matlab_startup_plugins/lmgrimpl/libmwlmgrimpl.so --remove-files |
复制替换的.so文件:
1 | # cp Matlab_Crack/libmwlmgrimpl.so /usr/local/Matlab/R2020a/bin/glnxa64/matlab_startup_plugins/lmgrimpl/ |
创建激活配置文件:
1 | # tee /usr/local/Matlab/activate.ini &> /dev/null << EOF |
1 | # chmod 444 /usr/local/Matlab/activate.ini |
激活:
1 | # /usr/local/Matlab/R2020a/bin/activate_matlab.sh -propertiesFile /usr/local/Matlab/activate.ini |
成功显示:Silent activation succeeded.
添加matlab环境变量:
1 | # vi /etc/profile |
1 | # source /etc/profile |
编写测试脚本:
1 | # cat > matlab_test.m << EOF |
启动报错:
1 | # matlab |
安装软件:
1 | # yum install -y xorg-x11-server-utils |
启动成功:
1 | # matlab |
测试:
1 | >> matlab_test |
非交互式测试:
1 | # matlab -batch matlab_test |