search

What is centos7 yum

Mar 03, 2022 pm 05:52 PM
centos7yum

In centos7, the full name of yum is "Yellowdog update Modified", which is a Shell front-end package manager in Fedora, RedHat and SUSE. Yum is based on RPM package management and can automatically download and install RPM packages from designated servers.

What is centos7 yum

#The operating environment of this tutorial: centos7 system, thinkpad t480 computer.

What is yum

Yum is the abbreviation of Yellowdog update Modified. It is a Shell front-end package manager in Fedora, RedHat and SUSE.

Based on RPM package management, it can automatically download and install RPM packages from a designated server. It can automatically handle dependencies and install all dependent software packages at once, without the need to download and install them again and again.

yum provides commands to find, install, and delete a certain, a group, or even all software packages. The commands are concise and easy to remember.

The purpose of yum is to automatically upgrade, install/remove rpm installation packages (that is to say, the yum command operates on RPM packages), collects rmp-related information, checks dependencies, and prompts users solve.

The key to yum is to have a reliable repository. As the name suggests, this is the software warehouse. It can be an http or ftp site, or a local software pool, but it must contain the rpm header and rmp header. The header includes various information about rmp, including description, function, provided files, dependencies, etc. It is by collecting this information that the remaining tasks can be completed automatically.

Yum itself is a system that automatically manages installation packages running on Linux. The idea of ​​yum is to use a central repository (repository) to manage the interrelationships of a part or even a distribution of applications, and perform related upgrades, installations, deletions, etc. based on the calculated software dependencies, reducing the dependencies that Linux users have always had a headache for. question.

At this point, yum and apt are the same. apt was originally used by debian deb type software management, but now it can also be used by rpm under RedHat.

Features of yum

1. Multiple repositories can be configured at the same time

2. Simple configuration file (generally the configuration file is /etc/yum.conf )

 3. Automatically solve dependency problems encountered when adding or deleting rpm packages

 4. Keep consistent with the rpm database

yum configuration file

yum configuration file, its absolute path is generally: /etc/yum.conf. All configuration information of yum is stored in this file, which is the most important content in the yum system.

Yum.conf is generally divided into two parts: main and repository, but by default there is only the main part. Each yum.conf can only have one main section. The repository section defines the specific configuration of each source/server, which can be one or more. Often located in various files in the /etc/yum.repo.d directory.

Use cat /etc/yum.conf to view the contents of the file.

1.cachedir: This item is the cache directory of the RPM package downloaded by yum. yum stores the downloaded rpm package and database here

2.keepcache : Whether the cache is saved, 1 means retaining the software package after installation, 0 means deleting the software package after installation

3.debuglevel: Error log level, the level is 0-10, the default is 2 (only installation and deletion records are kept )

 4.logfile: Stores records of system update software. Users can check what updates they have made in the past days in the file configured by this configuration item

 5. pkgpolicy: Package policy. There are two options, newest and last. This function is if you set up multiple repositories, and the same software exists in different repositories at the same time, which one yum should install. If it is newest, yum will install the latest version. . If it is last, yum will sort the server IDs alphabetically and select the software installation on the last server.

6.distroverp: Specify a software package. Yum will determine your release version based on this package. The default is RedHat-release, or it can be any rpm installed for your own release. Bag.

7.tolerent: There are also two options, 1 and 0, indicating whether yum tolerates package-related errors on the command line. For example, you want to install three packages 1, 2, and 3. , and 3 of them have been installed before. If you set it to 1, yum will not show an error message. The default is 0.

8.exactarch: There are two options, 1 and 0, which represent whether to only upgrade the package with the same cpu system as the software package you installed. If it is set to 1, it will be as if you installed a i386 rpm, yum will not use the 1686 package to upgrade.

 9.retries: The number of retries after a network connection error occurs. If set to 0, it will retry infinitely.

10.obsoletes: This is an update parameter. For details, please refer to yum(8). Simply put, it is equivalent to upgrade and allows updates. Old RPM packages.

11.gpgcheck: Whether to check GPG (GNU Private Guard), a key signature.

12.plugins: Whether to allow the use of plug-ins, the default is 0 not allowed , but we generally use the yum-fastestmirror plug-in.

 13.installonly_limit: How many kernel packages are allowed to be retained.

 14.exclude: Shield RPM packages that you do not want to update. Wildcards can be used, and spaces are used to separate multiple RPM packages.

 15.reposdir: This option allows users to specify the absolute path to the .repo file. The .repo file contains information about the software repository (same as the [repository] section in the /etc/yum.conf file). reposdir=[absolute path to the directory containing the .repo file]

 16.bugtracker_url:trackingbugpath

Usage: man 5 yum.conf          # Detailed explanation of yum.conf is available

##yum Working principle

#yum’s working mode is C/S architecture:

  • ##ServerEnd(yumwarehouse): Dependency library, original file, verification code file.

  • Client: yumClient program, configuration file (ConnectionServerPath Information). #

#When executing the yum command, the address of the software warehouse will first be obtained from the many repo files in the "/etc/yum.repo.d" directory and Download "metadata". "Metadata" includes the package names of all software packages registered in the software warehouse and their required dependency environments. After yum obtains this information, it will compare it with the local environment and then list and confirm it. Which packages need to be installed, and the installation will start after the user confirms. "Metadata" is indexed by repomd.xml located in the repodata directory in the path related to the yum source server.

##yum system workflow:

  • ##Server side: All rpm packages are stored on the server, and then the dependencies of each rpm file are analyzed using related functions, and these data are recorded into files. Stored in a specific directory on the server.

  • ##Client: If you need to install a certain software, first download the dependencies recorded on the server Sexual relationship files (can be through WWW or FTP), by analyzing the record data downloaded from the server, and then obtaining all related software, downloading them all at once for installation. #

#.repo file

 What is a repo file? The repo file is the configuration file of the yum source (software warehouse) in Fedora. Usually a repo file defines the details of one or more software warehouses, such as where we will download the software packages that need to be installed or upgraded, and the settings in the repo file. The content will be read and applied by yum!

# Enter the /etc/yum.repos.d/ directory and you can See that there are three files as follows by default:

## Where CentOS-Base.repo is the configuration file of the yum network source (usually this is used) CentOS-Debuginfo .repo debug package, especially kernel-related updates and software installation

CentOS-Media.repo This is a file that is called after being mounted using a CD (I don’t have it on my machine)

CentOS-Vault. repo This is the old version of yum source configuration added to the latest new version (no...)

epel.repo: EPEL (Extra Packages for Enterprise Linux) is created by the Fedora community and is distributed for RHEL and derivatives Versions such as CentOS and other projects that provide high-quality software packages. After installing EPEL, just like on Fedora, you can use yum install package name to install many software that needed to be compiled and installed before, commonly used software or some more popular software, such as the now popular nginx, htop, ncdu , vnstat, etc., can be easily installed and updated using EPEL. You can install it directly by executing the command:

yum install epel-release

. If it cannot be installed, refer to:

yum command formatThe command form of yum is generally as follows :

yum [options] [command] [package ...]

The [options] are optional, and the options include -h (help), -y ( When prompted during the installation process, select "yes" for all), -q (do not display the installation process), etc. [command] is the operation to be performed, and [package...] is the object of the operation.

1.OPTIONS

--nogpgcheck: gpg check is prohibited;

        -y:    

The automatic answer is "yes"; ##, do not output display information

;

--disablerepo=repoidglob: Temporarily disable the repo specified here;

                    --enablerepo=repoidglob: Temporarily enable the repo specified here;                                                                                                                                          ;     ..com.com #COMMAND

(1)Display warehouse listrepolist

yum repolist [all|enabled|disabled] [All|available|unavailable]

See: https://blog.csdn.net/xmm1981/article/details/ 78258176

Recommended: "centos usage tutorial"

The above is the detailed content of What is centos7 yum. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
What Comes After CentOS: The Road AheadWhat Comes After CentOS: The Road AheadApr 16, 2025 am 12:07 AM

Alternatives to CentOS include RockyLinux, AlmaLinux, OracleLinux, and SLES. 1) RockyLinux and AlmaLinux provide RHEL-compatible binary packages and long-term support. 2) OracleLinux provides enterprise-level support and Ksplice technology. 3) SLES provides long-term support and stability, but commercial licensing may increase costs.

CentOS: Exploring the AlternativesCentOS: Exploring the AlternativesApr 15, 2025 am 12:03 AM

Alternatives to CentOS include UbuntuServer, Debian, Fedora, RockyLinux, and AlmaLinux. 1) UbuntuServer is suitable for basic operations, such as updating software packages and configuring the network. 2) Debian is suitable for advanced usage, such as using LXC to manage containers. 3) RockyLinux can optimize performance by adjusting kernel parameters.

Centos shutdown command lineCentos shutdown command lineApr 14, 2025 pm 09:12 PM

The CentOS shutdown command is shutdown, and the syntax is shutdown [Options] Time [Information]. Options include: -h Stop the system immediately; -P Turn off the power after shutdown; -r restart; -t Waiting time. Times can be specified as immediate (now), minutes ( minutes), or a specific time (hh:mm). Added information can be displayed in system messages.

Difference between centos and ubuntuDifference between centos and ubuntuApr 14, 2025 pm 09:09 PM

The key differences between CentOS and Ubuntu are: origin (CentOS originates from Red Hat, for enterprises; Ubuntu originates from Debian, for individuals), package management (CentOS uses yum, focusing on stability; Ubuntu uses apt, for high update frequency), support cycle (CentOS provides 10 years of support, Ubuntu provides 5 years of LTS support), community support (CentOS focuses on stability, Ubuntu provides a wide range of tutorials and documents), uses (CentOS is biased towards servers, Ubuntu is suitable for servers and desktops), other differences include installation simplicity (CentOS is thin)

Centos configuration IP addressCentos configuration IP addressApr 14, 2025 pm 09:06 PM

Steps to configure IP address in CentOS: View the current network configuration: ip addr Edit the network configuration file: sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0 Change IP address: Edit IPADDR= Line changes the subnet mask and gateway (optional): Edit NETMASK= and GATEWAY= Lines Restart the network service: sudo systemctl restart network verification IP address: ip addr

How to install centosHow to install centosApr 14, 2025 pm 09:03 PM

CentOS installation steps: Download the ISO image and burn bootable media; boot and select the installation source; select the language and keyboard layout; configure the network; partition the hard disk; set the system clock; create the root user; select the software package; start the installation; restart and boot from the hard disk after the installation is completed.

Centos8 restarts sshCentos8 restarts sshApr 14, 2025 pm 09:00 PM

The command to restart the SSH service is: systemctl restart sshd. Detailed steps: 1. Access the terminal and connect to the server; 2. Enter the command: systemctl restart sshd; 3. Verify the service status: systemctl status sshd.

How to restart the network in centos8How to restart the network in centos8Apr 14, 2025 pm 08:57 PM

Restarting the network in CentOS 8 requires the following steps: Stop the network service (NetworkManager) and reload the network module (r8169), start the network service (NetworkManager) and check the network status (by ping 8.8.8.8)

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor