国内镜像源

CentOS-7国内常用镜像源:


阿里云epel源:wget -O /etc/yum.repos.d/epel-7.repo https://mirrors.aliyun.com/repo/epel-7.repo


阿里云:

wget -O /etc/yum.repos.d/CentOS-aliyun.repo https://mirrors.aliyun.com/repo/Centos-7.repo


清华:

wget -O /etc/yum.repos.d/CentOS-tuna.repo https://mirrors.tuna.tsinghua.edu.cn/centos/7/os/x86_64/


中科大:

wget -O /etc/yum.repos.d/CentOS-ustc.repo https://mirrors.ustc.edu.cn/centos/7/os/x86_64/


网易:

wget -O /etc/yum.repos.d/CentOS-163.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo


腾讯:

wget -O /etc/yum.repos.d/CentOS-tx.repo http://mirrors.cloud.tencent.com/repo/centos7_base.repo


搜狐:

wget -O /etc/yum.repos.d/CentOS-sohu.repo http://mirrors.sohu.com/help/CentOS7-Base-sohu.repo


华为:

wget -O /etc/yum.repos.d/CentOS-hw.repo http://mirrors.myhuaweicloud.com/repo/CentOS-7.repo

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
Ubuntu 24.04(代号“Focal Fossa”)是一个长期支持版的Linux发行版,对于国内用户来说,由于官方下载速度可能较慢,推荐使用国内镜像源来加速软件包的安装和更新。以下是如何设置国内镜像源的一些常见步骤: 1. **更换Ubuntu软件仓库源**: - 打开终端(`Ctrl+Alt+T`) - 运行命令 `sudo software-properties-gtk` 或者直接编辑 `/etc/apt/sources.list` 文件 - 在文件中找到 `deb [arch=amd64] https://mirrors.ubuntu.com/ubuntu focal main restricted universe multiverse` 这一行,将其替换为中国镜像源,如阿里云、中科大、清华大学等提供的源。例如,可以改为 `deb [arch=amd64] http://mirrors.aliyun.com/ubuntu focal main restricted universe multiverse` 2. **添加国内镜像仓库**: - 对于阿里云:运行 `echo "deb http://mirrors.aliyun.com/ubuntu focal main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/alibaba.list` - 对于中科大:运行 `echo "deb http://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ustc.list` - 更换为其他镜像地址,需替换相应的URL。 3. **刷新和更新索引**: - 完成上述操作后,执行 `sudo apt update` 以便系统从新设置的镜像源获取最新的软件包信息。 4. **安装软件**: - 使用 `sudo apt install <package-name>` 安装所需的软件。 注意:虽然国内镜像源能提高下载速度,但并不是所有软件包都一定能在国内镜像中找到最新版本,因此在遇到需要更新的软件时,仍可能需要访问官方源。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值