1.安装NFS:
# aptitude install nfs-common nfs-kernel-server portmap
2.创建一个nfs共享的目录,我创建的是 /nfs
#mkdir /nfs
3.配置NFS共享目录:
# gedit /etc/exports
添加如下语句:
/nfs *(rw,sync,no_root_squash,no_all_squash,no_subtree_check)
4.查看本机NFS共享的目录(其中192.168.1.192为本机IP):
# showmount -e 192.168.1.192
5.启动NFS服务:
# /etc/init.d/nfs-kernel-server restart
6.客户端测试连接:
# mount -t nfs -o nolock 192.168.1.192:/nfs /mnt/hd5