1. 前提条件:有安装linux系统的iso
2. 添加yum文件:touch /etc/yum.repos.d/iso.repo
[iso]
name=CentOS-$releasever - Media
baseurl=file:///centos-iso/
enabled=1
gpgcheck=1
gpgkey=file:///centos-iso/RPM-GPG-KEY-redhat-release
3. 添加镜像文件:
mkdir /centos-iso;
cp Centos-7.0.iso /centos-iso;
mount -t iso9660 -o loop iso/CentOS-7-x86_64-DVD-1503-01.iso /centos7-iso/
4. 可以安装个软件试试了(注意:这里不要用yum clean all以及yum makecache命令)
yum install vim