freeCodeCamp/guide/chinese/linux/setting-up-yum-repositories.../index.md

47 lines
792 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
title: Setting Up Yum Repositories in RedHat/CentOS Linux
localeTitle: 在RedHat / CentOS Linux中设置Yum存储库
---
YUM存储库是Linux软件RPM包文件的仓库。
RPM包文件是Red Hat Package Manager文件可以在Red Hat / CentOS Linux上快速轻松地安装软件。
## 在RedHat CentOS Linux中设置Yum存储库
第1步检查是否存在现有存储库。
```sh
#yum repolist
```
你会发现没有存储库。
第2步将目录更改为
```sh
#cd /etc/yum.repos.d
```
第3步创建新文件
```sh
#vim myrepo.repo
```
第4步在文件中键入以下行
```sh
[file-name]
name=filename
baseurl="location of yum repositories"
gpgcheck=0
```
第5步保存并退出
第6步重复步骤1
```sh
You Will find repositories
```