RedHatLinux local yum source configuration

Source: Internet
Author: User
Configure yun source in Virtual Machine [root @ localhost ~] # Mkdir/isomount/dev/cdrom/isocd/isoll [root @ localhostiso] # cd/etc/yum. repos. d/[root@localhostyum.repos.d] # lsrhel-source.repo [root@localhostyum.repos.d] # cprel

Configure yun source under Virtual Machine

[Root @ localhost ~] # Mkdir/iso
Mount/dev/cdrom/iso
Cd/iso
Ll
[Root @ localhost iso] # cd/etc/yum. repos. d/
[Root @ localhost yum. repos. d] # ls
Rhel-source.repo
[Root @ localhost yum. repos. d] # cp rhel-source.repo iso. repo

[Root @ localhost yum. repos. d] # cat iso. repo
# The Name Of The yun source, which is globally unique and unique
[Rhel-iso]
# Comment
Name = Red Hat Enterprise Linux $ releasever-$ basearch-Source
# Yum Source Path. Three protocols are supported: http, ftp, and file. file indicates the local file, And/iso indicates the actual path.
Baseurl = file: // iso
#1 indicates enabled, 0 indicates disabled
Enabled = 1
# Fingerprint verification. The value 0 indicates no verification.
Gpgcheck = 0
# Verify the reference file
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-RedHat-release

[Root @ localhost yum. repos. d] # pwd
/Etc/yum. repos. d
[Root @ localhost yum. repos. d] # ll
Total 8
-Rw-r --. 1 root 173 Jul 23 19:09 iso. repo
-Rw-r --. 1 root 529 Apr 28 2011 rhel-source.repo
# You can test whether the configuration is successful or enter iso to check whether files exist.
[Root @ larrywen yum. repos. d] # yum grouplist | grep Devel
Additional Development
Desktop Platform Development
Development tools
Server Platform Development

Configure local yum source on a real machine

[Root @ larrywen yum. repos. d] # mkdir/iso
[Root @ larrywen yum. repos. d] # cp rhel-source.repo iso. repo

[Root @ larrywen yum. repos. d] # cat iso. repo
# The Name Of The yun source, which is globally unique and unique
[Rhel-iso]
# Comment
Name = Red Hat Enterprise Linux $ releasever-$ basearch-Source
# Yum Source Path. Three protocols are supported: http, ftp, and file. file indicates the local file, And/iso indicates the actual path.
Baseurl = file: // iso
#1 indicates enabled, 0 indicates disabled
Enabled = 1
# Fingerprint verification. The value 0 indicates no verification.
Gpgcheck = 0
# Verify the reference file
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

# Mount the local disk. Run the mount command.
[Root @ larrywen yum. repos. d] # mount
/Home/Wentasy/software/rhel-server-6.1-x86_64-dvd.iso/iso-o loop
# You can test whether the configuration is successful or enter iso to check whether files exist.
[Root @ larrywen yum. repos. d] # yum grouplist | grep Devel
Additional Development
Desktop Platform Development
Development tools
Server Platform Development

# Restart after mount fails. To make it permanently effective, add this sentence
[Root @ localhost yum. repos. d] # echo "mount/dev/cdrom/iso">/etc/rc. local
[Root @ localhost yum. repos. d] # cat/etc/rc. local
#! /Bin/sh
#
# This script will be executed * after * all the other init scripts.
# You can put your own initialization stuff in here if you don't
# Want to do the full Sys V style init stuff.

Touch/var/lock/subsys/local
Mount/dev/cdrom/iso

Recommended reading:

Redhat local yum source configuration http://www.linuxidc.com/Linux/2012-11/75127.htm

For more information about RedHat, see RedHat topic page http://www.linuxidc.com/topicnews.aspx? Tid = 10

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.