Linux NFS 介绍,linuxnfs介绍


由SUN开发,用于在不同的系统之间使用,所以其设计与主机系统无关,用户想使用远程文件时,只需要mount –t nfs就可以把远程的文件拿到本地,像使用本地文件一样使用,非常方便。

它采用C/S架构,结合使用RPC 和 XDR(外部数据表示)可以使用数据在不同的计算机之间交换。

启动NFS文件服务器时,、/etc/rc.local会自动启动exportfs程序,指定可以导出的文件或目录,当然,你也可以自己启动。

sudo exportfs –rv

安装NFS

#check whether install nfs
rpm -qa | grep nfs

启动NFS

service nfs start

配置服务器

服务器配置需要编辑/etc/exports文件,在文件中列出服务器想要共享给外面的目录。

dir ip(rules)

sample:

/app *(rw,sync,insecure,root_squash)

客户机装载:

mount –t nfs nfs_volume(ip:/dir) local_dir

mount –t nfs ip:/app /mnt

卸载NFS:

unmount

相关内容