1. Mount ISO image #创建挂载点 mkdir /mnt/chroom #手动挂载iso镜像 mount -o loop -t iso9660 /tmp/xxx.iso /mnt/chroom # (-t specify mount type -o Mount mode) #查看是否挂载成功 df -h cd /mnt/chroom #取消挂载 umount /mnt/chroom # #设定开机自动挂载-Method 1 vi /etc/rc.d/rc.local # (The RC.D directory below corresponds to each level start-up add-on) new mount -o loop -t iso9660 /tmp/ xxx.iso /mnt/chroom # #设定开机自动挂载-Method 2 vi /etc/fstab new /tmp/ xxx.iso /mnt/chroom iso9660 loop 0 0 #查看开机自动挂载是否设定成功 umount mount -a2. Setting the yum source to ISO image cd /etc/yum.repos.d ls New Source vi cdroom.repo [cdroom] Library name name=isofile baseurl=file:///mnt/ Cdroom designated as local disc mount point enable=1 enable gpgcheck=0 Check Gpg-key, for 1 check must specify the downstream information, 0 does not check gpgkey=file:///etc/pki/rpm-gpg// rpm-gpg-key-redhat-release find the corresponding file according to different version # (can not create a new REPOS.D file, add the above content into the REPOS.D file) #将原系统自带的包停用 mv rhel-source.repo rhel-source.repo.bak #清缓存 yum clean all #更新 yum update
3. About Yum source can specify the external network of Tsinghua source or Ali
https://mirrors.tuna.tsinghua.edu.cn/
Https://mirrors.aliyun.com/repo/Centos-5.repo
Https://mirrors.aliyun.com/repo/Centos-6.repo
Linux 0-2 Mount ISO and set Yum source as ISO image