配置文件路径
不同 Linux 发行版组织 NFS 服务的方式并不相同,建议阅读发行版手册,以了解配置文件的详细路径。
for Ubuntu 20.04
Ubuntu/Network File System (NFS)
/etc/default/nfs-common
/etc/default/nfs/kernel-server
在配置文件中,参数 NEED_* 控制某个服务是否被运行。但是,在基于 systemd 的安装中,该参数并不会生效。需要通过 systemctl 来直接管理服务。
for Ubuntu 22.04
Ubuntu/Network File System (NFS)
/etc/nfs.conf:a INI-style config file, see the nfs.conf(5) manpage for details.
/etc/nfs.conf.d/:其中的 *.conf 文件将覆盖 nfs.conf 的配置;
命令 nfsconf(8) 能够用来查看(或配置)nfs.conf 文件
将 Ubuntu 20.04 升级到 Ubuntu 22.04 时,脚本将进行配置转换,以生成 nfs.conf 文件。参考 Ubuntu/Network File System (NFS) 文档,以获取更多细节信息。