Home>Article>Operation and Maintenance> Is yum built-in with centos?
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.
The operating environment of this article: centos 7 system, Dell G3 computer.
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 #此项可不填写,建议填写。
[appstream-dvd] name=AppStream-DVD baseurl=file:///mnt/dvd/AppStream/ enabled=1 #此项可不填写,建议填写。 gpgcheck=0 #此项可不填写,建议填写。
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.
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!