配置Debian Minimal系统涉及多个步骤,从安装到基本配置,再到优化和安全性增强。以下是一个详细的指南:
sudo apt update
sudo apt upgrade -y
sudo apt update 和 sudo apt install netplan.io。ip addr命令。/etc/netplan/ 目录下的 .yaml 文件,例如 /etc/netplan/01-netcfg.yaml,定义网络接口的设置。sudo netplan apply。auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.4.4
sudo apt-get update 和 sudo apt-get install network-manager。sudo systemctl start NetworkManager。nm-connection-editor,添加、编辑或删除网络连接配置。sudo apt install ufw -ysudo ufw enablesudo ufw allow ssh配置静态IP(如上所示)
启用root远程登录:
/etc/ssh/sshd_config 文件:PasswordAuthentication yes
PermitRootLogin yes
sudo systemctl restart sshdsudo apt-get clean
sudo apt autoclean
sudo apt autoremove
top、htop、vmstat、iostat、netstat、free 和 df。/etc/sysctl.conf 文件,添加或修改内核参数来优化性能,例如增加文件描述符限制、调整TCP窗口大小等。sudo apt update 和 sudo apt upgrade 命令来更新系统,确保所有软件包都是最新的。unattended-upgrades 软件包:sudo apt install unattended-upgrades通过以上步骤,您可以完成Debian Minimal系统的基本配置和优化,确保系统的高效、安全和稳定运行。