如何在 Linux 中通过 rpcbind 启动和停止 NFS 服务?

问题浏览数Icon
3
问题创建时间Icon
2025-06-06 15:40:00
作者头像
ptflyaway
  1. 启动NFS服务: a. 启动rpcbind:sudo systemctl start rpcbindsudo service rpcbind start b. 启动NFS服务:sudo systemctl start nfs-serversudo service nfs start

  2. 停止NFS服务: a. 停止NFS服务:sudo systemctl stop nfs-serversudo service nfs stop b. 停止rpcbind:sudo systemctl stop rpcbindsudo service rpcbind stop

  3. 验证状态:

    • sudo systemctl status rpcbind nfs-server
    • sudo service rpcbind status + sudo service nfs status

注意:部分系统需先启动nfs-idmapd服务,建议配置开机自启:sudo systemctl enable rpcbind nfs-server

更多回答