zoukankan      html  css  js  c++  java
  • debian大便系统配置国内软件源

    本例在debian:buster-slim docker镜像中实验通过

    1、启动docker实例

    docker run -it --name debian debian:buster-slim bash
    

    2、进入容器备份原始软件源配置文件

    mv /etc/apt/sources.list /etc/apt/sources.list.bak
    

    3、写入网易软件源地址或中科大软件源地址到source.list文件

    cat > /etc/apt/sources.list << EOF
    deb http://mirrors.163.com/debian/ buster main contrib non-free
    # deb-src http://mirrors.163.com/debian/ buster main contrib non-free
    deb http://mirrors.163.com/debian/ buster-updates main contrib non-free
    # deb-src http://mirrors.163.com/debian/ buster-updates main contrib non-free
    deb http://mirrors.163.com/debian/ buster-backports main contrib non-free
    # deb-src http://mirrors.163.com/debian/ buster-backports main contrib non-free
    deb http://mirrors.163.com/debian-security buster/updates main contrib non-free
    # deb-src http://mirrors.163.com/debian-security buster/updates main contrib non-free
    EOF
    

    cat > /etc/apt/sources.list << EOF
    deb http://mirrors.ustc.edu.cn/debian/ buster main contrib non-free
    # deb-src http://mirrors.ustc.edu.cn/debian/ buster main contrib non-free
    deb http://mirrors.ustc.edu.cn/debian/ buster-updates main contrib non-free
    # deb-src http://mirrors.ustc.edu.cn/debian/ buster-updates main contrib non-free
    deb http://mirrors.ustc.edu.cn/debian/ buster-backports main contrib non-free
    # deb-src http://mirrors.ustc.edu.cn/debian/ buster-backports main contrib non-free
    deb http://mirrors.ustc.edu.cn/debian-security buster/updates main contrib non-free
    # deb-src http://mirrors.ustc.edu.cn/debian-security buster/updates main contrib non-free
    EOF
    

    4、执行apt-get update命令更新软件包索引

    apt-get update
    

    5、安装vim、unzip等软件包

    apt-get install vim unzip
    

    参考:https://mirrors.tuna.tsinghua.edu.cn/help/debian/

  • 相关阅读:
    Asp.Net 获取客户端真实IP方法总结
    C# 中英文符号互转(半角全角互转)
    执行git commit命令提示: “Please tell me who you are”的解决方案
    Tools
    VSC
    DevOps
    VSC
    DevOps
    DevOps
    K8S
  • 原文地址:https://www.cnblogs.com/gaohongyu/p/14078563.html
Copyright © 2011-2022 走看看