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/

  • 相关阅读:
    java 多线程
    数据结构与算法-----快速排序
    JS 强制类型转化
    VS Code 编辑器
    MySQL8数据库安装配置和启动
    listview更改选中时item背景色(转)
    Android下用程序的方法为ListView设置分割线Divider样式
    listview android:cacheColorHint,android:listSelector属性作用
    Android手动显示和隐藏软键盘
    android调试debug快捷键
  • 原文地址:https://www.cnblogs.com/gaohongyu/p/14078563.html
Copyright © 2011-2022 走看看