常用的开源软件镜像站
阿里巴巴开源镜像站点:http://mirrors.aliyun.com
腾讯软件源:https://mirrors.tencent.com/
浙江大学开源软件镜像站:http://mirrors.zju.edu.cn/
应用示例:
CentOS 7.9安装阿里(aliyun)yum:
备份仓库文件本篇忽略。
下载阿里云仓库文件
CentOS 7使用:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
清空原本yum缓存:yum clean all
生成新的阿里云的yum缓存,加速下载预热数据:yum makecache
测试:
yum list #显示软件源中所有可用的包
yum list|grep nfs #查找软件源中某个包
Anolis OS 龙蜥7.9 安装浙江大学软件源
输入以下命令替换配置:
sed -e 's|mirrors.openanolis.cn|mirrors.zju.edu.cn|g' \ -i.bak \ /etc/yum.repos.d/AnolisOS-*.repo
其它
一般内网服务器通过代理上网,内网服务器修改本地HOST解析,来实现代理上网使用阿里云的yum
内网服务器修改本地HOST解析
vi /etc/hosts 编辑HOST文件
192.18.111.1 mirrors.aliyun.com 添加阿里云yum域名解析代理,只需代理80端口
192.18.111.9 mirrors.zju.edu.cn 添加浙江大学开源软件镜像站域名,需要代理80端口和443端口
一些报错解决方法
有时会出现 nothing to do 或者 no package ntfs-3g available 提示,原因是默认源里没有ntfs3g包,可以添加aliyun的epel源来yum安装
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo #添加epel yum源
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo #或者这样,也是添加epel yum源
yum list|grep ntfs-3g #查看源里有没有ntfs-3g
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
· SQL Server 2025 AI相关能力初探
· 为什么 退出登录 或 修改密码 无法使 token 失效