yum install autofs
systemctl enable ---now autofs
以后就会自动挂载光盘
[root05:56 PMcentos8 ~]#cd /misc
[root05:56 PMcentos8 /misc]#cd cd/
[root05:56 PMcentos8 /misc/cd]#ls 以下的两个包中存放的rpm包
AppStream BaseOS EFI images isolinux media.repo TRANS.TBL
[root06:07 PMcentos8 /misc/cd/BaseOS/Packages]#cp bash-4.4.19-10.el8.x86_64.rpm /data/
[root06:07 PMcentos8 /misc/cd/BaseOS/Packages]#cd /data
[root06:07 PMcentos8 /data]#ls
bash-4.4.19-10.el8.x86_64.rpm
将rpm文件转化为 cpio格式,然后解开里面的文件
[root06:08 PMcentos8 /data]#rpm2cpio bash-4.4.19-10.el8.x86_64.rpm |cpio -id
13573 blocks
[root06:09 PMcentos8 /data]#ls
bash-4.4.19-10.el8.x86_64.rpm etc usr
原文:https://blog.51cto.com/u_14847540/2743355