Files
freeCodeCamp/guide/chinese/linux/setting-up-yum-repositories-in-redhat-linux/index.md
2018-10-16 21:32:40 +05:30

47 lines
792 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
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
```