2345技术员联盟

CentOS6.4系统NFS安装配置教程

  • 来源:www.it892.com 原创,转载,摘录,分享
  • 时间:2014-02-25
  • 阅读:
  • 本文标签:CentOSNFS安装

安装:

[root@localhost etc]# rpm -qa | grep nfs
nfs-utils-lib-1.1.5-6.el6.i686
nfs4-acl-tools-0.3.3-6.el6.i686
nfs-utils-1.2.3-36.el6.i686

[root@localhost etc]# rpm -qa | grep rpcbind
rpcbind-0.2.0-11.el6.i686
[root@localhost etc]#

以上两个软件如果没有安装,可以用yum,在线安装。

配置:

主要配置文件:/etc/exports
[root@localhost /]# vi /etc/exports
/tmp 192.168.0.0/24(rw) //把“/tmp”共享给192.168.0.0网段(可读)。
/tmp 192.168.0.65(rw,sync,no_root_squash) //把“/tmp”共享给192.168.0.65(可读可写,同步)。

[root@localhost etc]# service portmap restart
停止 portmap:[ 确定 ]
启动 portmap:[ 确定 ]
[root@localhost etc]# service nfs restart //设置完成后重启服务
关闭 NFS mountd:[ 确定 ]
关闭 NFS 守护进程:[ 确定 ]
关闭 NFS quotas:[ 确定 ]
关闭 NFS 服务: [失败]
启动 NFS 服务: [ 确定 ]
关掉 NFS 配额:[ 确定 ]
启动 NFS 守护进程:[ 确定 ]
启动 NFS mountd:[ 确定 ]

[root@localhost etc]# showmount -e //查看自己共享的服务
Export list for localhost.localdomain:
/tmp 192.168.0.0/24,localhost

[root@localhost tmp]# showmount -a //显示已经与客户端连接上的目录信息
All mount points on localhost.localdomain:
192.168.0.213:/tmp
================================

客户端连接:

# showmount -e 192.168.0.248 //列出可供使用的NFS
Export list for 192.168.0.248:
/tmp 192.168.0.65,192.168.0.213

# mount 192.168.0.248:/tmp /mnt //挂载“/tmp”目录到“/mnt”下。

===========================================================================

NFS的挂载错误:

# mount 192.168.0.70:/tmp /mnt/tmp

mount:1831-008 放弃:

192.168.0.70:/tmp

vmount: 操作不允许执行。

# nfso -p -o nfs_use_reserved_ports=1

正在将 nfs_use_reserved_ports 设置为 1

正在 nextboot 文件中将 nfs_use_reserved_ports 设置为 1

# mount 192.168.0.70:/tmp /mnt/tmp

# ls /mnt/tmp

本文来自电脑技术网www.it892.com),转载本文请注明来源.
本文链接:http://www.it892.com/content/system/Linux/20140225/5263.html
热点排行
无觅相关文章插件,快速提升流量