Centos7 local Yum Source

Source: Internet
Author: User
Tags gpg

Use a CD image as the software Yum Source:

[1] upload the centos7 CD image to the/usr/local/src directory (Tool xftp)

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/41/70/wKiom1PV5XbCBLw4AAHFOIhJnuI773.jpg "Title =" 2014-07-28 13-52-35_iso-xftp 4.png" alt = "wkiom1pv5xbcblw4aahfoihjnui773.jpg"/>

[2] mounting system files

Mkdir/Media/CDROM # This directory name is used to it; CD/usr/local/srclsCentOS-7.0-1406-x86_64-DVD.iso # Mount-T iso9660-o loop/usr/local/src/CentOS-7.0-1406-x86_64-DVD.iso/Media/CDROM/mount:/dev/loop0 is write-protected, mounting read-only # cd/Media/CDROM/[[email protected] CDROM] # lscentos_buildtag EULA images liveos repodata RPM-GPG-KEY-CentOS-Testing-7EFI GPL isolinux packages RPM-GPG-KEY-CentOS-7 trans. TBL

[3] setting automatic mounting of system image files upon startup

Vim/etc/fstab/usr/local/src/CentOS-7.0-1406-x86_64-DVD.iso/Media/CDROM/iso9660 ults, Ro, loop 0 0: X # Save and exit

Remarks: ISO CD-ROM disc standard file system

mount -l/usr/local/src/CentOS-7.0-1406-x86_64-DVD.iso on /media/cdrom type iso9660 (ro,relatime) [CentOS 7 x86_64]

[4] configure the local Yum source file;

Vim/etc/yum. repos. d/centos7-media.repo [centos7-media] Name = Red Hat centos Linux 7.0 # custom baseurl = file: /// media/CDROM # local image file path enabled = 1 #1 for starting Yum source, 0 for disabling gpgcheck = 1 #1 for checking GPG-KEY, 0 does not check gpgkey = file: // media/CDROM/RPM-GPG-KEY-CentOS-7 # GPG-KEY file path
Yum clean all # Clear cache loaded plugins: fastestmirrorcleaning repos: Base centos7-media epel extras updatescleaning up everythingcleaning up list of fastest mirrors
[[Email protected] ~] # Yum makecache # cache local Yum source package information loaded plugins: fastestmirrorbase | 3.6 kb 00:00:00 centos7-media | 3.6 kb 00:00:00 epel/x86_64/Metalink | 5.3 kb 00:00:00 epel | 4.4 kb 00:00:00 extras | 3.3 kb 00:00:00 updates | 3.4 kb 00:00:00 (1/20 ): centos7-media/group_gz | 157 KB 00:00:00 (2/20): centos7-media/filelists_db | 2.8 mb 00:00:00 (3/20): base/7/x86_64/group_gz | 157 KB 00:00:00 (4/20 ): centos7-media/primary_db | 2.7 MB 00:00:00 (5/20): centos7-media/other_db | 1.1 MB 00:00:00

[5] install software using local Yum Source:

# Yum -- enablerepo = centos7-media search httpd # check whether there is an httpd package... httpd. x86_64: Apache HTTP Serverhttpd-devel.x86_64: Development interfaces for the Apache HTTP serverhttpd-itk.x86_64: mpm Itk for Apache HTTP Serverhttpd-manual.noarch: Documentation for the Apache HTTP serverhttpd-tools.x86_64: tools for use with the Apache HTTP server... # Yum -- enablerepo = centos7-media-y install httpdinstalled: httpd. x86_64 0: 2. 4.6-18. el7.centos
# rpm -qa httpdhttpd-2.4.6-18.el7.centos.x86_64

The local Yum source has been configured!

This article is from the "Siberian wolf" blog, please be sure to keep this source http://kernal.blog.51cto.com/8136890/1531366

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.