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

/ect/exports

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

ref: http://docs.fedoraproject.org/en-US/Fedora/14/html/Storage_Administration_Guide/s1-nfs-server-export.html#s1-nfs-server-config-exports

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

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

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

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

4 /etc/fstab

192.168.230.129:/nfs /nfs nfs rw 0 0