SUSE下配置NFS服务


SUSE 如何配置NFS服务
通过修改相关配置文件并运行命令管理进行配置
首先编辑/etc/exports文件
# export /opt to any host with option ro,async
/opt *(ro,async)
# export /media to hosts 192.168.0.0/255.255.255.0 with option ro,root_squash,sync
/media 192.168.0.0/255.255.255.0(ro,root_squash,sync)

然后运行下面的命令激活并启动nfs服务
# chkconfig -a nfsserver
# /etc/init.d/nfsserver restart (这里和RedHat不同,/etc/init.d/nfs start/stop/restart)

检查及排错:
可以用下面的命令查看nfs服务有没有起来
# rpcinfo -p localhost | grep nfs

用下面的命令加载上面输出的nfs文件系统,占位符<ipaddr>是服务器的 ip 地址
# mount -t nfs <ipaddr>:/opt /mnt

相关内容