章工运维 章工运维
首页
  • linux
  • windows
  • 中间件
  • 监控
  • 网络
  • 存储
  • 安全
  • 防火墙
  • 数据库
  • 系统
  • docker
  • 运维工具
  • other
  • elk
  • K8S
  • ansible
  • Jenkins
  • GitLabCI_CD
  • 随笔
  • 面试
  • 工具
  • 收藏夹
  • Shell
  • python
  • golang
友链
  • 索引

    • 分类
    • 标签
    • 归档
    • 首页 (opens new window)
    • 关于我 (opens new window)
    • 图床 (opens new window)
    • 评论 (opens new window)
    • 导航栏 (opens new window)
周刊
GitHub (opens new window)

章工运维

业精于勤,荒于嬉
首页
  • linux
  • windows
  • 中间件
  • 监控
  • 网络
  • 存储
  • 安全
  • 防火墙
  • 数据库
  • 系统
  • docker
  • 运维工具
  • other
  • elk
  • K8S
  • ansible
  • Jenkins
  • GitLabCI_CD
  • 随笔
  • 面试
  • 工具
  • 收藏夹
  • Shell
  • python
  • golang
友链
  • 索引

    • 分类
    • 标签
    • 归档
    • 首页 (opens new window)
    • 关于我 (opens new window)
    • 图床 (opens new window)
    • 评论 (opens new window)
    • 导航栏 (opens new window)
周刊
GitHub (opens new window)
  • linux

  • windows

  • 中间件

  • 网络

  • 安全

  • 存储

  • 防火墙

  • 数据库

  • 系统

  • docker

  • other

    • debian中科大替换教程
      • 命令安装
    • Alpine安装php各种扩展
    • 使用http-server启动本地服务
    • windows文件同步备份
    • axure将项目同步到svn和axhub
    • Makefile入门
    • Rsyslog开源日志服务器
    • 在windows64位系统安装mysql
    • 博客vue报错版本依赖问题解决
    • VMware搭建群晖
    • 一个开源的照片管理程序——photoprism
    • 搭建属于自己的云笔记——leanote
    • 浏览器跨域问题
    • 从0到1搭建支付和发卡系统
    • 运维常见故障及排查方法
    • 高德MCP智能体搞定旅游计划
    • 不花一分钱从0到1建站教程
  • 监控

  • 运维
  • other
章工运维
2022-12-15
目录

debian中科大替换教程

警告

操作前请做好相应备份

一般情况下,将 /etc/apt/sources.list 文件中 Debian 默认的源地址 http://deb.debian.org/ (opens new window) 替换为 http://mirrors.ustc.edu.cn (opens new window) 即可。

可以使用如下命令:

sudo sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list

当然也可以直接编辑 /etc/apt/sources.list 文件(需要使用 sudo)。以下是 Debian Stable 参考配置内容:

deb http://mirrors.ustc.edu.cn/debian stable main contrib non-free # deb-src http://mirrors.ustc.edu.cn/debian stable main contrib non-free deb http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-free # deb-src http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-free # deb http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free # deb-src http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free

同时你也可能需要更改 Debian Security 源,请参考 Debian Security 源使用帮助

sed -i 's/security.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list

更改完 sources.list 文件后请运行 sudo apt-get update 更新索引以生效。

小技巧

使用 HTTPS 可以有效避免国内运营商的缓存劫持,但需要事先安装 apt-transport-https (Debian Buster 及以上版本不需要)。

# 命令安装

ubuntu 容器安装ping ifconfig ip命令
进入容器测试ifconfig  ping 没有-------->>很尴尬
apt-get install net-tools
###   ifconfig
apt-get install iputils-ping
###  ping
apt-get install iproute2
####  ip
centos安装ping
yum install -y iputils

安装ps命令
apt-get update
apt-get  install  procps
1
2
3
4
5
6
7
8
9
10
11
12
13
14
微信 支付宝
上次更新: 2022/12/19, 09:47:20

← 如何清除Docker缓存并释放系统空间 Alpine安装php各种扩展→

最近更新
01
shell脚本模块集合
05-13
02
生活小技巧(认知版)
04-29
03
生活小技巧(防骗版)
04-29
更多文章>
Theme by Vdoing | Copyright © 2019-2025 | 点击查看十年之约 | 鄂ICP备2024072800号
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式