1、把linux操作系统安装包ftp到服务器某个目录:
2、创建挂载目录并挂载:
mkdir /mnt/iso
mount -o loop /data/RHEL_7.2_x86_64.iso /mnt/iso
3、新建yum配置文件,/etc/yum.repos.d/local.repo,必须以.repo结尾。
内容如下:
[base]
name=Server
baseurl=file:///mnt/iso
enabled=1
gpgcheck=0
4、清除原yum源并生成缓存
yum clean
yum list