Linux Yum Configure local ISO image

Source: Internet
Author: User
Tags gpg metalink

1. Local Source configuration: Cdiso.repo

Copy all the contents of the ISO image file into/public/software/cdrom, where the node points to the local yum.

[Email protected] ~]# vim/etc/yum.repos.d/cdiso.repo[cd1]name=cd1baseurl=file:/ /  Public/software/cdromEnabled=1gpgcheck=0

2. Local Source configuration: File.repo

Mount-o Loop Xxxx.iso/mnt/iso

If there are other *.repo files under/etc/yum.repos.d/, first create a backup folder, transfer these repo to the folder first, and write a new. Repo File Yourself

vi/etc/yum.repos.d/File.repo Add the following: [base]name=rhel6repobaseurl=file:// /mnt/isoenabled=1gpgckeck=0gpgkey=file: // Mnt/iso/rpm-gpg-key-redhat-release5. Clear Cacheyum Cleanall6- y install Treetree

3. Network Source Configuration

# cat/etc/yum.repos.d/cent6-Epel.repo [Base]name=centos-6-Base-Mirrors.ustc.edu.cnbaseurl=http://mirrors.ustc.edu.cn/centos/6/os/x86_64/#mirrorlist =http://Mirrorlist.centos.org/?release=6&arch=&repo=osgpgcheck=0Gpgkey=http://mirrors.ustc.edu.cn/centos/rpm-gpg-key-centos-6#released Updates [Updates]name=centos-6-Updates-Mirrors.ustc.edu.cnbaseurl=http://mirrors.ustc.edu.cn/centos/6/updates/x86_64/#mirrorlist =http://mirrorlist.centos.org/?release=6&arch=&repo=updatesgpgcheck=0Gpgkey=http://mirrors.ustc.edu.cn/centos/rpm-gpg-key-centos-6#additional Packages that could be useful[extras]name=centos-6-Extras-Mirrors.ustc.edu.cnbaseurl=http://mirrors.ustc.edu.cn/centos/6/extras/x86_64/#mirrorlist =http://Mirrorlist.centos.org/?release=6&arch=&repo=extrasgpgcheck=0Gpgkey=http://mirrors.ustc.edu.cn/centos/rpm-gpg-key-centos-6#additional packages that extend functionality of existing Packages[centosplus]name=centos-6-Plus-Mirrors.ustc.edu.cnbaseurl=http://mirrors.ustc.edu.cn/centos/6/centosplus/x86_64/#mirrorlist =http://Mirrorlist.centos.org/?release=6&arch=&repo=centosplusgpgcheck=1enabled=0Gpgkey=http://mirrors.ustc.edu.cn/centos/rpm-gpg-key-centos-6#contrib-packages by Centos Users[contrib]name=centos-6-Contrib-Mirrors.ustc.edu.cnbaseurl=http://Mirrors.ustc.edu.cn/centos/6/contrib//#mirrorlist =http://Mirrorlist.centos.org/?release=6&arch=&repo=contribgpgcheck=1enabled=0Gpgkey=http://mirrors.ustc.edu.cn/centos/rpm-gpg-key-centos-6[Epel]name=extra Packages forEnterprise Linux6-BaseURL=http://mirrors.ustc.edu.cn/epel/6/x86_64/#mirrorlist =https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=Failovermethod=priorityenabled=1Gpgcheck=0Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-epel-6[Epel-Debuginfo]name=extra Packages forEnterprise Linux6-  -Debugbaseurl=http://Mirrors.ustc.edu.cn/epel/6/x86_64/debug#mirrorlist =https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=Failovermethod=priorityenabled=0Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-epel-6gpgcheck=1[Epel-Source]name=extra Packages forEnterprise Linux6-  -Sourcebaseurl=http://Mirrors.ustc.edu.cn/epel/6/srpms#mirrorlist =https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=Failovermethod=priorityenabled=0Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-epel-6gpgcheck=1test whether the Yum list is running properly

Linux Yum Configure local ISO image

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.