Is yum built-in with centos?

WBOY
Release: 2022-04-26 16:42:40
Original
4618 people have browsed it

Yum comes with centos; the centos system will come with some yum warehouses by default. The directory where the warehouse is located is "/etc/yum.repos.d/", and the yum configuration file must use "repo" At the end, the system will also automatically generate a local yum mount name and several built-in online yum sources.

Is yum built-in with centos?

The operating environment of this article: centos 7 system, Dell G3 computer.

Is yum built-in with centos?

yum is built-in with centos

The yum command can be applied in Centos system very conveniently Dependency issues when we install rpm packages.

Centos system will come with some yum warehouses by default. The directory where the warehouse is located is /etc/yum.repos.d/. The yum warehouse configuration file must have repo as the end.

By default, Centos will automatically generate a local yum mount name and several built-in online yum sources

However, the built-in network yum sources are all foreign websites. Domestic access efficiency will be slower or even inaccessible. It is recommended to change to some well-known domestic yum sources. The yum sources can be Baidu yourself. Here is an Alibaba Cloud yum source for the Centos 8 series system (http://mirrors.aliyun.com/repo/Centos-8.repo)

yum warehouse settings. The yum warehouse can be used as a local DVD. You can also use the yum source provided on the Internet. If the server can be connected to the Internet, it is recommended to use the yum source on the Internet.

To set up the yum warehouse, we need to change the configuration file of the yum warehouse. Before making changes, we need to understand the content and format of the configuration in the yum warehouse.

Example:

Taking the Centos8 CD as an example, the Packages package in the Centos8 system is divided into two directories: Appsteam and BaseOS. When setting up the warehouse, you need to set up two directories. address. When setting the CD as a local yum warehouse, you first need to mount the CD locally. Here, I mount the local CD in the /mnt/dvd/ directory and use this as an example to configure the local yum warehouse.

Create a local.repo file in the /etc/yum.repos.d/ directory with the following content:

[baseos-dvd]
name=BaseOS-DVD
baseurl=file:///mnt/dvd/BaseOS/
enabled=1
#此项可不填写,建议填写。
gpgcheck=0
#此项可不填写,建议填写。
Copy after login
[appstream-dvd]
name=AppStream-DVD
baseurl=file:///mnt/dvd/AppStream/
enabled=1
#此项可不填写,建议填写。
gpgcheck=0
#此项可不填写,建议填写。
Copy after login

After writing the above configuration, save and exit. You can use yum repolist -v The command verifies whether the yum repository is valid. The successful verification results are as follows. Detailed information such as the number of installation packages in the warehouse, installation package size, installation package path, etc. will be displayed.

Is yum built-in with centos?

Recommended tutorial: "centos tutorial"

The above is the detailed content of Is yum built-in with centos?. 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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template