Debian9.4更换源的正确姿势

备份原有的源配置文件

$ cp /etc/apt/sources.list /etc/apt/sources.listbak 

#删除该源配置文件

$ rm -f /etc/apt/sources.list

#生成国内的源配置文件

$ echo "deb http://ftp.cn.debian.org/debian/ stretch main" > /etc/apt/sources.list

$ echo "deb http://ftp.cn.debian.org/debian/ stretch-updates main" >> /etc/apt/sources.list

 

$ echo "deb http://ftp.cn.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list

 

#更新源

$ apt-get update

 

debian的全球镜像站:

https://www.debian.org/mirror/list

转载于:https://blog.csdn.net/github_38313789/article/details/80675556

 

注意事项:网络不通使用ifup  网卡名字

安装ssh工具

apt-get install ssh按y确认安装

 

配置多个ip:

auto enp1s0f0
iface enp1s0f0 inet static
address 103.97.229.247
netmask 255.255.255.0
gateway 103.97.229.254
auto enp1s0f0:1
iface enp1s0f0:1 inet static
address 103.97.229.248
netmask 255.255.255.0

auto enp1s0f0:2
iface enp1s0f0:2 inet static
address 103.97.229.165
netmask 255.255.255.0

dns-nameservers 114.114.114.114 8.8.8.8 

 

posted @   小流亡  阅读(2406)  评论(0编辑  收藏  举报
编辑推荐:
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
阅读排行:
· 地球OL攻略 —— 某应届生求职总结
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 提示词工程——AI应用必不可少的技术
· .NET周刊【3月第1期 2025-03-02】
点击右上角即可分享
微信分享提示