Network File System

1 install nfs portmap

# yum isntall nfs-utils # yum install rpcbind

portmap has been substituted by rpcbind

2 start service

# service rpcbind start # service nfs start

rpcbind must start before nfs

3 configure


export host1(options1) host2(options2) host3(options3)

export: The directory being exported host: The host or network to which the export is being shared options: The options to be used for host


重启 nfs 或 重新读取配置文件, 可以使配置生效. 使用 exportfs 重新读取配置文件: exportfs -rv 重新读取配置文件, 立即生效

使用 showmount 查看机器的共享路径: # showmount -e Export list for /nfs *

查看本机和哪些机器有共享连接: # showmount

查看本机和指定机器之间共享目录情况: # showmount -d

4 /etc/fstab /nfs nfs rw 0 0