报错命令
# yum ......
报错代码
rpmdb BDB0113 Thread/process
解决方法
步骤一:删除 YUM 的软件数据库
# rm -rf /var/lib/rpm/_db*
步骤二:重建 YUM 的软件数据库
# rpm --rebuilddb
步骤三:清除 YUM 缓存
# yum clean all
步骤四:显示 YUM 是否恢复正常
# yum repolist
# yum ......
rpmdb BDB0113 Thread/process
# rm -rf /var/lib/rpm/_db*
# rpm --rebuilddb
# yum clean all
# yum repolist
# lspci | grep -i fibre
# ls /sys/class/fc_host/
host1 host2 host3 host4
# cat /sys/class/fc_host/host[1-4]/port_name
# cat /sys/class/fc_host/host5/port_state
online
# cat /sys/class/fc_host/host7/port_state
linkdown
# nmcli network on
或者:
# nmcli net on
# nmcli network off
或者:
# nmcli net off
# nmcli connection show
或者:
# nmcli conneciton
或者:
# nmcli con show
或者:
# nmcli con
或者:
# nmcli c s
# nmcli connection show --active
或者:
# nmcli conneciton --active
或者:
# nmcli con show --active
或者:
# nmcli con --active
# nmcli device connect <network device name>
或者:
# nmcli dev con <network device name>
# nmcli device status
或者:
# nmcli dev status
# nmcli connection add con-name <custom network card alias> ifname <network device name> type ethernet
(补充:这里 con-name 是指要指定一个自定义的网卡别名,ifname 是指要指明网络设备名)
或者:
# nmcli con add con-name <custom network card alias> ifname <network device name> type ethernet
(补充:这里 con-name 是指要指定一个自定义的网卡别名,ifname 是指要指明网络设备名)
# nmcli connection delete <custom network card alias>
或者:
# nmcli con del <custom network card alias>
# nmcli device connect <network device name>
或者:
# nmcli dev con <network device name>
# nmcli device disconnect <network device name>
或者:
# nmcli dev dis <network device name>
# nmcli connection modify <custom network card alias> ipv4.address <IP address>/<subnet mask> ipv4.gateway <gateway IP address> ipv4.dns <DNS IP address> autoconnect yes
或者:
# nmcli connection modify <custom network card alias> ipv4.address <IP address>/<subnet mask> ipv4.gateway <gateway IP address> ipv4.dns <DNS IP address 1>,<DNS IP address 2> autoconnect yes
# nmcli connection modify eth0 ipv4.address 192.168.1.1/24 ipv4.gateway 192.168.1.1 ipv4.dns 192.168.1.254 autoconnect yes
(补充:这里以添加给 eth0 网卡添加静态 IP 地址 192.168.1.1/24,网关 IP 地址 192.168.1.1,DNS 192.168.1.254 并开机自启为例)
或者:
# nmcli connection modify eth0 ipv4.address 192.168.1.1/24 ipv4.gateway 192.168.1.1 ipv4.dns 192.168.1.254,192.168.1.253 autoconnect yes
(补充:这里以添加给 eth0 网卡添加静态 IP 地址 192.168.1.1/24,网关 IP 地址 192.168.1.1,DNS 192.168.1.254 和 192.168.1.253 并开机自启为例)
# nmcli connection up <custom network card alias>
# nmcli connection down eth0
# nmcli connection modify <custom network card alias> +ipv4.address <IP address>/<subnet mask>
# nmcli connection modify eth0 +ipv4.addresses 192.168.0.100/24
(补充:这里以添加给 eth0 网卡额外添加 IP 地址 192.168.1.1/24 为例)
# nmcli connection modify <custom network card alias> -ipv4.address <IP address>/<subnet mask>
# nmcli connection modify eth0 -ipv4.addresses 192.168.0.100/24
(补充:这里以删除 eth0 网卡上的额外 IP 地址 192.168.1.1/24 为例)
# nmcli connection modify <custom network card alias> ipv4.gateway <gateway IP address>
# nmcli connection modify eth0 ipv4.gateway 192.168.1.1
(补充:这里以给 eth0 网卡添加网关 IP 地址 192.168.1.1 为例)
# nmcli connection up <custom network card alias>
# nmcli connection up eth0
(补充:这里以让给 eth0 网卡添加的网关 IP 生效为例)
# nmcli connection modify <custom network card alias> ipv4.gateway ""
# nmcli connection modify eth0 ipv4.gateway ""
(补充:这里以给 eth0 网卡删除网关的 IP 地址 192.168.1.1 为例)
# nmcli connection up <custom network card alias>
# nmcli connection up eth0
(补充:这里以让 eth0 网卡删除网关的操作生效为例)
# nmcli con mod <custom network card alias> ipv4.routes "<network segment> <gateway IP address>"
# nmcli con mod eth0 ipv4.routes "192.168.2.0/24 192.168.3.1"
(补充:这里以给 eth0 网卡添加 192.168.2.0/24 通过 192.168.3.1 的路由为例)
(注意:以后指向 192.168.2.0/24 的流量都会通过网卡 eth0)
# nmcli connection up <custom network card alias>
# nmcli connection up eth0
(补充:这里以让 eth0 网卡生效为例)
# ip link show
# ip link show ens192
1: ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 00:51:52:a4:fd:2d brd ff:ff:ff:ff:ff:ff
altname enp12s0
(补充:由上面的输出结果可以得知 ens192 网卡目前工作在 1000baseT/Full 状态)
# ethtool ens192
Settings for ens192:
Supported ports: [ TP ]
Supported link modes: 1000baseT/Full
10000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: No
Supported FEC modes: Not reported
Advertised link modes: Not reported
Advertised pause frame use: No
Advertised auto-negotiation: No
Advertised FEC modes: Not reported
Speed: 10000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: off
MDI-X: Unknown
Supports Wake-on: uag
Wake-on: d
Link detected: yes
(补充:由上面的输出结果可以得知 ens192 网卡目前工作在 1000baseT/Full 状态)
# lspci -vvv | grep Ethernet
0b:00.0 Ethernet controller: VMware VMXNET3 Ethernet Controller (rev 01)
Subsystem: VMware VMXNET3 Ethernet Controller
(补充:由上面的输出结果可以得知,网卡设备为 VMware VMXNET3 Ethernet Controller (rev 01) ,我们可以在网上搜索此设备名以得知此网卡的速率)
重启系统,进入内核选择界面,此时按下 “e” 键进入内核编辑界面


在 linux 开头的这 1 行将 “ro rhgb quiet” 对应位置的参数修改为 “rd.break enforcing=0”
或者:
这一步也可以换成直接在 linux 开头的这 1 行末尾添加 “rd.break console=tty0”

同时按下 “ctrl” 键和 “x” 键

switch_root:/# mount -o remount,rw /sysroot
switch_root:/# mount | grep sysroot
switch_root:/# chroot /sysroot
sh-4.4# echo 1 | passwd --stdin root
(补充:以上命令的作用是在修改的内核中,将 root 的密码修改为 1,并重启)
sh-4.4# touch /.autorelabel
sh-4.4# sync
sh-4.4# exit
switch_root:/# reboot
