一、 检查和确认NFS服务是否启动,若是没有启动执行:服务器
/etc/rc.d/init.d/nfs startspa
/etc/init.d/portmap start it
二、 编写共享目录和共享给那些机器权限
# vi /etc/exportsmap
/LUN1 210.32.80.203(rw,sync,no_root_squash)im
/LUN1 210.32.80.204(rw,sync,no_root_squash)脚本
/LUN3 210.32.80.207(rw,sync,no_root_squash)exports
/LUN3 210.32.80.206(rw,sync,no_root_squash)时间
启动NFSvi
# exportfs -rv
# exportfs -av
三、 挂载NFS,在须要访问共享的机器上执行挂载命令
在210.32.80.203上输入:
# mount 210.32.80.210:/LUN1 /LUN1
能够用“# df –h”命令看可否本身挂载(以下图)
[root@ids1 /]# df -h
其它须要挂载NFS主机的机器操做步骤同上。
在其它机器上检测可否访问,如不能访问,说明权限限制成功。(以下图所示)
四、 写入自动启动挂载脚本(在须要访问共享的服务器上)
Vi /etc/rc.local
mount 210.32.80.210:/LUN1 /LIN1
mount 210.32.80.210:/LUN1 /LIN1
mount 210.32.80.210:/LUN1 /LIN1
mount 210.32.80.210:/LUN1 /LIN1
mount 210.32.80.210:/LUN1 /LIN1
mount 210.32.80.210:/LUN1 /LIN1
mount 210.32.80.210:/LUN1 /LIN1
让系统在本身脚本中不断尝试挂载,以适应网卡链接延迟时间。