centos改为163yum源
时间: 2023-08-14 17:15:10 浏览: 246
要将CentOS的yum源改为163源,可以按照以下步骤进行操作:
1. 首先,备份原有的yum源文件,以防止修改出错后可以恢复。可以使用以下命令进行备份:
```
sudo cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
```
2. 下载163的yum源文件并替换原有的yum源文件。可以使用以下命令进行下载和替换:
```
sudo wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
```
3. 清除yum缓存,以便后续使用新的yum源。可以使用以下命令进行清除:
```
sudo yum clean all
```
4. 更新yum源并安装软件包。可以使用以下命令进行更新和安装:
```
sudo yum update
```
通过以上步骤,你就可以将CentOS的yum源改为163源了。\[1\]\[2\]\[3\]
#### 引用[.reference_title]
- *1* [centos7修改默认yum源为国内源](https://blog.csdn.net/water1209/article/details/128531123)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [CentOS 7 修改默认 yum 源](https://blog.csdn.net/qq_39330735/article/details/127981044)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [Linux(Centos7)配置更换 163yum源](https://blog.csdn.net/dontYouWorry/article/details/129023898)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文