如何安装 nmstate Fedora 36

在本教程中,我们学习如何安装 nmstate Fedora 36. nmstate 是声明式网络管理器 API

介绍

在本教程中我们学习如何安装 nmstate 在 Fedora 36.

什么是 nmstate

Nmstate 是一个附带命令行工具的库,它以声明方式管理主机网络设置,旨在满足企业通过北向声明式 API 和南向多提供商支持来管理主机网络的需求。

我们可以用 yum 或者 dnf 安装 nmstate 在 Fedora 36. 在本教程中,我们讨论这两种方法,但您只需选择一种方法来安装 nmstate。

安装 nmstate Fedora 36 使用dnf

更新 yum 数据库 dnf 使用以下命令。

sudo dnf makecache --refresh

更新 yum 数据库后,我们可以安装 nmstate 使用 dnf 通过运行以下命令:

sudo dnf -y install nmstate

安装 nmstate Fedora 36 使用 yum

更新 yum 数据库 yum 使用以下命令。

sudo yum makecache --refresh

更新 yum 数据库后,我们可以安装 nmstate 使用 yum 通过运行以下命令:

sudo yum -y install nmstate

如何卸载 nmstate Fedora 36

仅卸载 nmstate 打包我们可以使用以下命令:

nmstate 包装内容 Fedora 36

/usr/bin/nmstate-autoconf
/usr/bin/nmstatectl
/usr/lib/python3.10/site-packages/nmstatectl
/usr/lib/python3.10/site-packages/nmstatectl/__init__.py
/usr/lib/python3.10/site-packages/nmstatectl/__pycache__
/usr/lib/python3.10/site-packages/nmstatectl/__pycache__/__init__.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/nmstatectl/__pycache__/__init__.cpython-310.pyc
/usr/lib/python3.10/site-packages/nmstatectl/__pycache__/nmstate_autoconf.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/nmstatectl/__pycache__/nmstate_autoconf.cpython-310.pyc
/usr/lib/python3.10/site-packages/nmstatectl/__pycache__/nmstatectl.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/nmstatectl/__pycache__/nmstatectl.cpython-310.pyc
/usr/lib/python3.10/site-packages/nmstatectl/nmstate_autoconf.py
/usr/lib/python3.10/site-packages/nmstatectl/nmstatectl.py
/usr/share/doc/nmstate
/usr/share/doc/nmstate/README.md
/usr/share/doc/nmstate/examples
/usr/share/doc/nmstate/examples/bond_linuxbridge_vlan_absent.yml
/usr/share/doc/nmstate/examples/bond_linuxbridge_vlan_up.yml
/usr/share/doc/nmstate/examples/dns_edit_eth1.yml
/usr/share/doc/nmstate/examples/dns_remove.yml
/usr/share/doc/nmstate/examples/eth1_add_route.yml
/usr/share/doc/nmstate/examples/eth1_del_all_routes.yml
/usr/share/doc/nmstate/examples/eth1_with_ieee_802_1x.yml
/usr/share/doc/nmstate/examples/eth1_with_sriov.yml
/usr/share/doc/nmstate/examples/infiniband_pkey_ipoib_create.yml
/usr/share/doc/nmstate/examples/infiniband_pkey_ipoib_delete.yml
/usr/share/doc/nmstate/examples/linuxbrige_eth1_absent.yml
/usr/share/doc/nmstate/examples/linuxbrige_eth1_up.yml
/usr/share/doc/nmstate/examples/linuxbrige_eth1_up_port_vlan.yml
/usr/share/doc/nmstate/examples/mac_vlan_absent.yml
/usr/share/doc/nmstate/examples/mac_vlan_create.yml
/usr/share/doc/nmstate/examples/mac_vtap_absent.yml
/usr/share/doc/nmstate/examples/mac_vtap_create.yml
/usr/share/doc/nmstate/examples/ovsbridge_bond_create.yml
/usr/share/doc/nmstate/examples/ovsbridge_create.yml
/usr/share/doc/nmstate/examples/ovsbridge_delete.yml
/usr/share/doc/nmstate/examples/ovsbridge_dpdk_absent.yml
/usr/share/doc/nmstate/examples/ovsbridge_dpdk_create.yml
/usr/share/doc/nmstate/examples/ovsbridge_patch_create.yml
/usr/share/doc/nmstate/examples/ovsbridge_patch_delete.yml
/usr/share/doc/nmstate/examples/ovsbridge_vlan_port.yml
/usr/share/doc/nmstate/examples/veth1_absent.yml
/usr/share/doc/nmstate/examples/veth1_up.yml
/usr/share/doc/nmstate/examples/vlan101_eth1_absent.yml
/usr/share/doc/nmstate/examples/vlan101_eth1_down.yml
/usr/share/doc/nmstate/examples/vlan101_eth1_up.yml
/usr/share/doc/nmstate/examples/vrf0_absent.yml
/usr/share/doc/nmstate/examples/vrf0_with_eth1.yml
/usr/share/man/man8/nmstate-autoconf.8.gz
/usr/share/man/man8/nmstatectl.8.gz

参考

概括

在本教程中我们学习如何安装 nmstate 在 Fedora 36 使用 yum 和 [dnf]((/fedora/36/dnf/)。