关于我们

质量为本、客户为根、勇于拼搏、务实创新

< 返回新闻公共列表

云服务器 Centos7 更换阿里源和腾讯源

发布时间:2022/8/29 13:56:59
香港云服务器
  • 备份
    1. mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
    复制代码

  • 下载新的CentOS-Base.repo 到/etc/yum.repos.d/         
    1. 阿里云
    2. centos-6
    3. curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
    4. centos-7
    5. curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    6. 腾讯云
    7. wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos7_base.repo
    复制代码

  • 生成缓存并更新系统      

    1. yum clean all
    2. yum makecache
    3. yum list updates
    4. yum -y update(更新内核)

    5. yum -y upgrade(不更新内核)
    复制代码