What does yum mean in linux

藏色散人
Release: 2023-04-23 10:15:45
Original
3193 people have browsed it

Yum in Linux is the abbreviation of Yellow dog Updater Modified; the purpose of yum is to automatically upgrade, install and remove rpm packages, collect information about rpm packages, check dependencies and automatically prompt users to solve them.

What does yum mean in linux

#The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.

What is yum in Linux? How to configure? how to use?

yum is the abbreviation ofYellow dog Updater Modified. It was originally developed byyellow dogdeveloperTerra Soft. Written in python, it was still calledyup (yellow dog updater)at that time. It was later improved by theLinux@Dukedevelopment team at Duke University, hence the name.


The purpose of yum is to automatically upgrade, install/remove rpm packages, collect information about rpm packages, check dependencies and automatically prompt users to solve them.

The key to yum is to have a reliablerepository. As the name suggests, this is a software warehouse. It can be an http or ftp site, or it can be a local software pool, butMust include the rpm header. The header includes various information about the rpm package, including description, functions, provided files, dependencies, etc. It is by collecting these headers and analyzing them that the remaining tasks can be completed automatically. .

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. You can also make a yum server yourself, and you can make a yum server based on the CD image.


Build a yum server:

(1) Local yum (the server cannot access the Internet)

The first step : Mount the CD first

mount /dev/cdrom /media/ echo "/dev/cdrom /media iso9660 defaults 0 0" >> /etc/fstab 实现开机挂载
Copy after login

Step 2: Create a yum warehouse (take centos as an example)

vim /etc/yum.repos.d/iso.repo (iso is Get the name at will, but it must end with repo)

[Centos] name=CentOS baseurl=file:///media/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Copy after login

Then save and exit

(if it is a redhat5.x system, write file:///media/Server/ here, It is the system of redhat6.x file:///media/Packages/)

Explanation of parameters

##### [Centos] (这个是一个标识,可以随便取,必须唯一) name=CentOS (这个是一个名字,可以随便取,必须唯一) baseurl=file:///media/Server/ (本地的路径) enabled=1 (为1则是打开仓库,为0则是关闭仓库) gpgcheck=1 (公钥值) gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 (检测公钥值的文件路径) [ ]内的是仓库的名字 name是仓库的描述也可以说是名字 baseurl 仓库的位置 enabled 是否启用这个仓库,1为起用,0为禁用 gpgcheck 是否检查GPG签名(用来验证要安装的包是不是REDHAT官方的) gpgcheck 的存放地址我们需要用下面的命令导入这个签名。才能使用这项功能 #####
Copy after login

After building yum, first enter

yum clean all

(2) External network yum (the server can access the Internet)

vim /etc/yum.repos.d/163.repo

[base] name=centos6 baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch gpgecheck=1 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
Copy after login

Then save and exit

If the system is 5.x version of redhat (baseurl=http://mirrors.163.com/centos/5/os/$basearch)

When installing yum on the external network, you can go to this website first and have a look
http://mirrors.163.com/

Use yum

First use yum to upgrade the software. Most yum operations require superuser permissions. Of course, you can use sudo.

It is common to add and delete software after installing the system. Yum can also be qualified for this task, as long as the software is installed by rpm.

The installation command is:

yum install xxx

yum will query the database to see if there is this software package. If there is, check its dependency conflict. If there is no dependency conflict, it is best to download and install it; if there is, a prompt will be given asking whether you want to install the dependency at the same time, or delete the conflicting package. You can make your own judgment.

The command to delete is:

yum remove xxx

Same as installation, yum will also query the database and give Tips for resolving dependencies.

Commonly used commands of yum:

1.yum check-update 列出所有可更新的软件清单 2.yum update 安装所有更新软件 3.yum -y install  安装指定的软件 4.yum update  更新指定的软件 5.yum list  不加列出所有可安裝的软件清单,加了列出指定的 6.yum -y remove  删除软件 7.yum search  查找软件 8.yum list installed 列出所有已安装的软件包 9.yum list extras 列出所有已安装但不在 Yum Repository 內的软件包 10.yum info  不加列出所有软件包的信息,加了列出指定的 11.yum provides  列出软件包提供哪些文件 12.yum clean packages 清除缓存目录(/var/cache/yum)下的软件包 13. yum clean all 清除缓存目录(/var/cache/yum)下的软件包及旧的headers
Copy after login

Recommended learning: "linux video tutorial"

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

Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!