View /etc/protocols file
# cat /etc/protocols
View /etc/protocols file
# cat /etc/protocols
# sudo dpkg --configure -a
# sudo apt install --fix-broken
# sudo apt remove --purge postfix
(补充:这里以删除报错的 postfix 软件包为例)
# sudo apt clean
# sudo apt autoremove
# sudo apt update
# sudo apt upgrade
# sudo apt-get install postfix
(补充:这里以重新安装前面报错并删除的 postfix 软件包为例)
# cat /etc/apt/sources.list
# Ubuntu sources have moved to /etc/apt/sources.list.d/ubuntu.sources
# vim /etc/apt/sources.list.d/ubuntu.sources
创建以下内容:
Types: deb
URIs: http://security.ubuntu.com/ubuntu/
Suites: noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
# cat /etc/apt/sources.list
# Ubuntu sources have moved to /etc/apt/sources.list.d/ubuntu.sources
# vim /etc/apt/sources.list.d/ubuntu.sources
创建以下内容:
Types: deb
URIs: http://mirrors.aliyun.com/ubuntu/
Suites: noble noble-updates noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
(补充:这里以添加阿里云的软件源为例)
记录需要使用的网络端口的网卡机器码 (MAC) 地址
(步骤略)
(
注意:
1) 只有物理机才需要完成这步
2) 当物理机 1 个网络模块上有 2 个网络端口时,要特别注意 2 个网络端口各自的网卡机器码 (MAC) 地址,例如:戴尔服务器网络端口的网卡机器码 (MAC) 地址在页面的最下方
)
# ip a s
或者:
# ip address show
(补充:当出现 ”UP“ 字样时代表网卡已经启动)
(注意:nmcli device show 命令不能确认此时网卡是否联通)
# ethtool eth0
(注意:nmcli device show 命令不能确认此时网卡是否联通)
# ifconfig eth0 192.168.0.2/24
或者:
# ip a add 192.168.0.2/24 dev eth0
(补充:这里以给 eth0 网卡添加临时 IP 地址 192.168.0.2/24 为例)
(注意:只有当确认网卡是联通的时候才进行此操作)
# route add default gw 192.168.0.1
或者:
# ip route add default via 192.168.0.1
(注意:只有当确认网卡是联通的时候才进行此操作)
# ip a s
# route -n
# yum install iptraf-ng -y
# iptraf-ng
IP traffic monitor --> All interfaces
https://access.redhat.com/solutions/30479