Current location - Quotes Website - Signature design - How to configure yum in redhat?
How to configure yum in redhat?

Yum client configuration in centos:

One of the configuration files of the yum client is /etc/yum.repos.d/*.repo

, where A *.repo file in this file is a yum source.

Yum.repo file content structure.

[yumtest]

#YUM source tag, just be different from other YUM source tags

nameserver=Servername

#YUM source The name can be different from other YUM source names

baseurl=[ftp://***

|

mand]

#

#

or

for

ONLY

the

media

repo,

do

this:

#

#

yum

--disablerepo=\*

--enablerepo=c5-media

[command]

[c5-media]< /p>

name=CentOS-$releasever

-

Media

baseurl=file:///media/CentOS/

####This line is the most important

gpgcheck=1

enabled=0

gpgkey=file:///etc/pki/rpm -gpg/RPM-GPG-KEY-beta

You can add the correct location of the disc to be mounted in the system after baseurl=file:///media/CentOS/

. If it is usually file:///media/CentOS/Server, etc.

Then you can install the software through the following command after mounting the CD

yum

--disablerepo=\*

--enablerepo=c5-media

install

[Software package]

(Only add "

after the ordinary yum command --disablerepo=\*

--enablerepo=c5-media

", such as:

yum

-- enablerepo=c5-media

remofe

Software package)