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/

  • 相关阅读:
    hdu5784 极角排序+two point
    极角排序理解
    计算多边形的面积模板
    18年CUG校赛--恶魔的序列
    二分图匹配模板
    POJ 2342 Anniversary party
    蓝桥杯真题-小计算器
    第八届蓝桥杯省赛真题题解
    Django具体操作(四)
    网络爬虫(三)
  • 原文地址:https://www.cnblogs.com/nihaorz/p/12036344.html
Copyright © 2011-2022 走看看