1. 网卡配置
#编辑网卡
sudo nano /etc/network/interfaces
#网卡配置【静态】
allow-hotplug ens32
iface ens32 inet static
address 10.1.1.4/28
gateway 10.1.1.2
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 10.1.1.2
#配置DNS
nano /etc/resolv.conf
nameserver 10.1.1.2
#查看网卡
ip addr
#关闭网卡【ifdown 网卡名称】
sudo ifdown ens32
#开启网卡【ifup 网卡名称】
sudo ifup ens32
2. SSH配置
#编辑ssh文件
sudo nano /etc/ssh/sshd_config
打开22端口【默认是关闭的,将“#”去掉就是打开,可自行修改端口】
这条是决定能否通过远程使用root用户登录
将这条修改成:“permitRootLogin yes”就是打开【不推荐】
#重启ssh服务
sudo service ssh restart
3. 源库配置
#编辑源库
sudo nano /etc/apt/sources.list
#更换源,将系统默认的源关闭,如:
# deb http://deb.debian.org/debian/ bullseye-updates main contrib
#然后添加稳定版国内源
# Security updates
deb https://mirrors.ustc.edu.cn/debian-security/ bullseye-security main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian-security/ bullseye-security main contrib non-free
# Stable updates
deb https://mirrors.ustc.edu.cn/debian bullseye-updates main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian bullseye-updates main contrib non-free
# Base repository
deb https://mirrors.ustc.edu.cn/debian bullseye main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian bullseye main contrib non-free
# Stable backports
deb https://mirrors.ustc.edu.cn/debian bullseye-backports main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian bullseye-backports main contrib non-free
在官方有说明:
https://www.debian.org/doc/manuals/debian-handbook/apt.zh-cn.html#sect.apt-sources.list.stable
更新软件包
sudo apt update #读取源库
sudo apt upgrade #更新软件包
标签:cn,配置,基础,debian,网卡,https,contrib,deb,Debian
From: https://www.cnblogs.com/c0ldzera/p/16943314.html