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

How Redhat linux configures local yum sources

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article is about how Redhat linux configures local yum feeds. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

First of all, I will introduce the commonly used yum source commands:

1. Use YUM to find software packages

Command: yum search

two。 List all installable software packages

Command: yum list

3. List all updatable software packages

Command: yum list updates

4. List all installed packages

Command: yum list installed

5. List all packages that are installed but not within Yum Repository

Command: yum list extras

6. List the specified software packages

Command: yum list

7. Use YUM to get package information

Command: yum info

8. List information for all software packages

Command: yum info

9. List all updatable package information

Command: yum info updates

10. List all installed package information

Command: yum info installed

11. List all software packages installed but not within Yum Repository

Command: yum info extras

twelve。 List the files provided by the software package

Command: yum provides

Here's how to configure the local yum source. It's very simple:

Copy all the software in the Server/ directory of the system installation disk to / RPMS

[root@localhost Server] # cp * / RPMS

. It may take a long time to wait. The number of software is relatively large.

Install createrespo to create a software repository:

The code is as follows:

[root@localhost RPMS] # cd / RPMS/

[root@localhost RPMS] # rpm-ivh createrepo-0.4.11-3.el5.noarch.rpm

Warning: createrepo-0.4.11-3.el5.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

Preparing... # [100%]

1:createrepo # # [100%]

[root@localhost RPMS] # cp / mnt/cdrom / RPMS/

[root@localhost RPMS] # createrepo-p / RPMS/

2292 + 2292-libXt-1.0.2-3.1.fc6.i386.rpm

Saving Primary metadata

Saving file lists metadata

Saving other metadata

Configure rhel-debuginfo.repo

The code is as follows:

[root@localhost /] # cd / etc/yum.repos.d/

[root@localhost yum.repos.d] # ls

Rhel-debuginfo.repo

[root@localhost yum.repos.d] #

The code is as follows:

[rhel-debuginfo]

Name=Red Hat Enterprise Linux $releasever-$basearch-Debug

Baseurl= ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/$basearch/Debuginfo/

Enabled=0

Gpgcheck=1

Gpgkey= file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

The code is as follows:

[rhel-debuginfo]

Name=Red Hat Enterprise Linux $releasever-$basearch-Debug

Baseurl= file:///RPMS/

Enabled=1

Gpgcheck=1

Gpgkey= file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Update software package

The code is as follows:

[root@localhost RPMS] # yum update

Loaded plugins: rhnplugin, security

This system is not registered with RHN.

RHN support will be disabled.

Rhel-debuginfo | 951B 00:00

Rhel-debuginfo/primary | 829 kB 00:00

Rhel-debuginfo 2292/2292

Skipping security plugin, no data

Setting up Update Process

No Packages marked for Update

[root@localhost RPMS] #

This should do it. You can check it out [take gcc as an example]:

The code is as follows:

[root@localhost RPMS] # yum install gcc

Loaded plugins: rhnplugin, security

This system is not registered with RHN.

RHN support will be disabled.

Setting up Install Process

Resolving Dependencies

-> Running transaction check

-> Package gcc.i386 0vl 4.1.2-46.el5 set to be updated

-> Finished Dependency Resolution

Dependencies Resolved

=

Package Arch Version Repository Size

=

Installing:

Gcc i386 4.1.2-46.el5 rhel-debuginfo 5.2m

Transaction Summary

=

Install 1 Package (s)

Update 0 Package (s)

Remove 0 Package (s)

Total download size: 5.2 M

Is this ok [y/N]: y

Downloading Packages:

Running rpm_check_debug

Running Transaction Test

Finished Transaction Test

Transaction Test Succeeded

Running Transaction

Installing: gcc 1/1

Installed:

Gcc.i386 0RO 4.1.2-46.el5

Complete!

[root@localhost RPMS] #

Thank you for reading! This is the end of this article on "how to configure local yum sources for Redhat linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

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

Servers

Wechat

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

12
Report