RedHat6.7 Linux local Yum warehouse setup

Source: Internet
Author: User
Tags gpg yum repolist

RedHat6.7 YumLocal warehouse Building

Preparatory work:

1.RedHat6.7 disc

2. mount the disc:

Insert the disc and make sure the system recognizes the disc

the optical device defaults to /dev/cdrom under

# Ls/dev/cdrom

650) this.width=650; "title=" 1.png "src=" http://s5.51cto.com/wyfs02/M01/89/D3/ Wkiol1gfddbyjp-3aaaq0nr4t8s476.png "alt=" Wkiol1gfddbyjp-3aaaq0nr4t8s476.png "/>

If the disc is not found ---- Find a disc

# Ls-l/dev | grep cdrom

650) this.width=650; "title=" 2.png "src=" Http://s2.51cto.com/wyfs02/M02/89/D6/wKiom1gfDguzZQewAAAt313yhLs518.png " alt= "Wkiom1gfdguzzqewaaat313yhls518.png"/>

1) Trigger Mount

LS/MISC/CD  

2) Manual Mount

Mkdir/my-yong create one with the following My-yong Catalogue

Mount/dev/cdrom/my-yong mount the disc to My-yong directory, My-yong The directory must be created in advance.

3) auto mount on boot

with Vim Edit Fstab file

Add devices and parameters that need to be mounted on the last line

Format:

Device Files mount point file system type hang in parameter memo Mark detection sequence

Vim/etc/fstab

/dev/cdrom /my-yong iso9660 defaults 0 0

650) this.width=650; "title=" 3.png "src=" Http://s4.51cto.com/wyfs02/M00/89/D3/wKioL1gfDmXSaE_vAAC1xYZAmlI096.png " alt= "Wkiol1gfdmxsae_vaac1xyzamli096.png"/>

3.Yum Client edit configuration file

1 ) The first kind support hand hit three is the year

Vim/etc/yum.repos.d/yum.repo

in the /etc/yum.repos.d/ Create and configure Yum.repo

[ identification of the warehouse ]

name= Warehouse Name

baseurl= path of the disc Mount

enabled=  if open, 1 0 do not open

gpgcheck= whether to check the signature, 1 for monitoring 0 to not detect

gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-redhat-release // Path to signature authentication information

Gpgcheck set to 0 gpgkey There's no need to

650) this.width=650; "title=" 4.png "src=" Http://s4.51cto.com/wyfs02/M01/89/D6/wKiom1gfDneh4ET-AAAf7xwBfKc623.png " alt= "Wkiom1gfdneh4et-aaaf7xwbfkc623.png"/>

Run Yum repolist View Yam whether the building is successful.

650) this.width=650; "title=" 5.png "src=" Http://s3.51cto.com/wyfs02/M01/89/D6/wKiom1gfDpXyyomJAABIZKclX58697.png " alt= "Wkiom1gfdpxyyomjaabizkclx58697.png"/>

2) automatically generate script files in the form of commands

Yum-config-manager--add File:///my-yong

is automatically generated /etc/yum.repos.d/my-yong.repo

650) this.width=650; "title=" 6.png "src=" Http://s4.51cto.com/wyfs02/M01/89/D3/wKioL1gfDsTCsRMtAABPiBRKd7k239.png " alt= "Wkiol1gfdstcsrmtaabpibrkd7k239.png"/>

with Ls/etc/yum.repos.repo To see if a file was created

Modify Configuration yum.conf file

put gpgcheck=1 Change into gpgcheck=0

Vim/etc/yum.conf

650) this.width=650; "title=" 7.png "src=" Http://s1.51cto.com/wyfs02/M02/89/D6/wKiom1gfDt7idY5dAAA6wHkbGVE470.png " alt= "Wkiom1gfdt7idy5daaa6whkbgve470.png"/>

3) Copy the template file to /etc/yum.repos.d/ Catalogue

cd/etc/yum.repos.d/

Mvrhel-source.repo Yan.repo

Enter /etc/yum.repos.d/ Catalogue

put Rhel-source.repo Rename to Yan.repo

with Vim You can change it,

Summary: Yum building is actually very simple, summed up on two steps.

1 , mount a CD-ROM, Mount

2 , in /etc/yum.repos.d/ directory, create a suffix named .repo file and configure the file, vim

enabled=1 1 Span lang= "en-US" style= "margin:0px;font-size:18pt;" xml:lang= "en-US" >1 0

Finally, use it again . yum.repolist command to view our Yum whether the mount succeeds


This article is from "Linux operations-Small Ink" blog, please be sure to keep this source http://xmomo.blog.51cto.com/5994484/1870022

RedHat6.7 Linux local Yum warehouse setup

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.