https://access.redhat.com/solutions/1355233
SOLUTION 已验证 - 已更新 2018年十二月7日22:43 -
环境
- Red Hat Enterprise Linux 7
问题
- How do I configure NFS in RHEL 7?
- How do I enable the NFS service in RHEL 7?
决议
-
Install NFS packages on the system using the following command:
# yum install nfs-utils rpcbind -
Enable the services at boot time:
# systemctl enable nfs-server # systemctl enable rpcbind # systemctl enable nfs-lock <-- In RHEL7.1 (nfs-utils-1.3.0-8.el7) this does not work (No such file or directory). it does not need to be enabled since rpc-statd.service is static. # systemctl enable nfs-idmap <-- In RHEL7.1 (nfs-utils-1.3.0-8.el7) this does not work (No such file or directory). it does not need to be enabled since nfs-idmapd.service is static. -
Start the NFS services:
# systemctl start rpcbind # systemctl start nfs-server # systemctl start nfs-lock # systemctl start nfs-idmap -
Check the status of NFS service:
# systemctl status nfs -
Create a shared directory:
# mkdir /test -
Export the directory:
# vi /etc/exports /test *(rw) -
Exporting the share:
# exportfs -r -
Restart the NFS service:
# systemctl restart nfs-server

本文围绕 Red Hat Enterprise Linux 7 系统展开,主要探讨了如何在 RHEL 7 中配置 NFS 以及启用 NFS 服务。给出了安装 NFS 包、开机启用服务、启动服务、检查状态、创建共享目录、导出目录等一系列操作步骤。
97

被折叠的 条评论
为什么被折叠?



