100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > Centos6.4 NFS的安装与配置

Centos6.4 NFS的安装与配置

时间:2021-01-19 11:50:40

相关推荐

Centos6.4  NFS的安装与配置

安装:

[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的挂载错误:

#mount192.168.0.70:/tmp/mnt/tmp

mount:1831-008放弃:

192.168.0.70:/tmp

vmount:操作不允许执行。

#nfso-p-onfs_use_reserved_ports=1

正在将nfs_use_reserved_ports设置为1

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

#mount192.168.0.70:/tmp/mnt/tmp

#ls/mnt/tmp

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。