Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

To be a public network yum source

2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

1. Network YUM source uses 163yum source

1. Go to the http://mirrors.163.com/.help/centos.html website to download the corresponding yum file (

CentOS7

CentOS6

CentOS5) CentOS-Base-163.repo, put in / etc/yum.repos.d/

two。 Run yum makecache to generate cache

3.yum search softwarename search software

4.yum list softwarename lists installed software

5.yum install softwarename installation software

6.yun remove softwarename Uninstall Software

(sohu yum source: http://mirrors.shou.com, is used in the same way)

2. Local yum sources use CD-ROM yum sources

1. Mount the CD

Mount-t iso9660-o loop / dev/cdrom / media/CentOS

two。 Remove the original repo file from the / etc/yum.repos.d directory

3. Create a new repo file

Vi / etc/yum.repos.d/CentOS-Media.repo

Add the following fields:

[c5-media]

Name=CentOS-$releasever-Media

Baseurl= file:///media/CentOS/

Gpgkey= file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

4. Refresh repos

Yum makecache

Reference / etc/yum.repos.d/CentOS-Media.repo file

# CentOS-Media.repo

#

# This repo is used to mount the default locations for a CDROM / DVD on

# CentOS-5. You can use this repo and yum to install items directly off the

# DVD ISO that we release.

#

# To use this repo, put in your DVD and use it with the other repos too:

# yum-- enablerepo=c5-media [command]

#

# or for ONLY the media repo, do this:

#

# yum-- disablerepo=\ *-- enablerepo=c5-media [command]

[c5-media]

Name=CentOS-$releasever-Media

Baseurl= file:///media/CentOS/

File:///media/cdrom/

File:///media/cdrecorder/

Gpgcheck=1

Enabled=0

=

Another way: configure yum source under redhat linux

Using the yum source that comes with the redhat linux system seems to be licensed and costs a fee. Using the CentOS source is free and easy to configure.

1.#cd / etc/yum.repos.d/ # Open source path

2.#wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo # download the source of CentOS

3.#yum install softwarename

Attachment: the yum source used by CentOS is configured in two files under the / etc/yum.repos.d/ directory, where:

CentOS-Base.repo is the source of configuration network yum

CentOS-Media.repo is the local yum source for configuration

Configure network yum source 7:

-wget-O / etc/yum.repos.d/centos.repo http://mirrors.aliyun.com/repo/Centos-7.repo

Two sed-I's Universe release _ always _ _ seven _ etc/yum.repos.d/centos.repo

3. Clear yum cache, yum clean all

Update the list of yum networks, "yum list"

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report