Linux local Yum source build and network Yum Source setup

Source: Internet
Author: User
Tags gpg

First, local Yum source construction

mount the disc first[email protected]/]# mount/dev/cdrom/media/cdrom/ packages with Yum are already installed by default, so you can configure them directly:

[[email protected] ~]# Cd/etc/yum.repos.d/yum Source configuration file Drop directory

[[Email protected] yum.repos.d]# mv Centos-base.repo Centos-base.repo.bak First rename the network Yum source profile (to invalidate it)

[[email protected] yum.repos.d]# vim Centos-media.repo edit local Yum source file

[C6-media]

name=centos-$releasever-media Local Yum Source name (optionally modifiable)

Baseurl=file:///media/cdrom CD-ROM mount directory/mnt/sr0

Gpgcheck=1

Enabled=1 using this yum source (equals 0 is not enabled)

Gpgkey=file:///mnt/sr0/rpm-gpg-key-centos-6 Local Yum Source key

To perform a Yum list detection is available

First, the network of Yum Source construction

The source of the network Yum (provided that the Internet is connected, the Yum source used here is the address of China University of Science and Technology:

China University of Science and Technology: http://centos.ustc.edu.cn/centos/)

[[email protected] ~]# cd/etc/yum.repos.d/ Yum Source configuration file placement Directory [[email protected] yum.repos.d]# vim Centos-base.repo Edit network Yum source file

[Base]

name=centos-$releasever-base

#mirrorlist =http://mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=os

baseurl=http://centos.ustc.edu.cn/centos/$releasever/os/$basearch/

Gpgcheck=1

Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-6


#released Updates

[Updates]

name=centos-$releasever-updates

#mirrorlist =http://mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=updates

baseurl=http://centos.ustc.edu.cn/centos/$releasever/updates/$basearch/

Gpgcheck=1

Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-6


#additional packages that could be useful

[Extras]

name=centos-$releasever-extras

#mirrorlist =http://mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=extras

baseurl=http://centos.ustc.edu.cn/centos/$releasever/extras/$basearch/

Gpgcheck=1

Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-6


#additional packages that extend functionality of existing packages

[Centosplus]

name=centos-$releasever-plus

#mirrorlist =http://mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=centosplus

baseurl=http://centos.ustc.edu.cn/centos/$releasever/centosplus/$basearch/

Gpgcheck=1

Enabled=0

Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-6

#contrib-packages by Centos Users

[Contrib]

name=centos-$releasever-contrib

#mirrorlist =http://mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=contrib

baseurl=http://centos.ustc.edu.cn/centos/$releasever/contrib/$basearch/

Gpgcheck=1

Enabled=0

Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-6


Three, the attention matters:

When using Yum, it is best to have only one Yum source in effect, because the system defaults to using the network Yum source.

CentOS6.3 Configuring the Yum source http://www.linuxidc.com/Linux/2012-10/72750.htm

CentOS 6.4 uses local Yum source http://www.linuxidc.com/Linux/2013-12/93805.htm

RedHat Linux local Yum Source configuration http://www.linuxidc.com/Linux/2013-08/88217.htm

RedHat 6.2 Linux Modified Yum source free use of CentOS source http://www.linuxidc.com/Linux/2013-07/87383.htm

Configuring Epel Yum Source http://www.linuxidc.com/Linux/2012-10/71850.htm

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

Yum configuration file Description http://www.linuxidc.com/Linux/2013-04/83298.htm

RedHat 6.1 Install yum (graphic) http://www.linuxidc.com/Linux/2013-06/86535.htm

YUM installation and cleanup http://www.linuxidc.com/Linux/2013-07/87163.htm

Build Yum Local source http://www.linuxidc.com/Linux/2014-07/104533.htm on CentOS 6.4

For more information on CentOS, see the CentOS feature page http://www.linuxidc.com/topicnews.aspx?tid=14


 

Linux local Yum source build and network Yum Source 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.