Linux 0-2 Mount ISO and set Yum source as ISO image

Source: Internet
Author: User
Tags gpg aliyun

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.