博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
nfs 服务器和客户端区别_如何设置和配置NFS服务器和客户端
阅读量:2517 次
发布时间:2019-05-11

本文共 3160 字,大约阅读时间需要 10 分钟。

nfs 服务器和客户端区别

NFS is widely deployed and used even after more than twenty year. NFS is easy to set up and easy to use. This introduces how to set up the NFS server and clients. We use the Fedora system as the example. The here is for RHEL/CentOS/Fedora and derived OSes.

NFS甚至在二十多年后仍得到广泛部署和使用。 NFS易于设置且易于使用。 这介绍了如何设置NFS服务器和客户端。 我们以Fedora系统为例。 本适用于RHEL / CentOS / Fedora和派生的操作系统。

设置NFS服务器 (Set up an NFS Server)

The needed packages are nfs and rpcbind, install them by yum or dnf:

所需的软件包是nfsrpcbind ,请通过yumdnf安装它们:

# yum install nfs-utils rpcbind

Configure /etc/exports to give clients the permission to use the NFS directories.

配置/ etc / exports以授予客户端使用NFS目录的权限。

编辑/ etc / exports (Edit /etc/exports)

For example, to allow the servers inside subnet 10.0.0.1/24 to mount the /home directory with read/write permission. Add this line to /etc/exports:

例如,允许子网10.0.0.1/24内的服务器安装具有读/写权限的/ home目录。 将此行添加到/ etc / exports:

/home 10.0.0.1/24(rw)

For details of the exports functions, please refer to .

有关导出功能的详细信息,请参阅 。

启动NFS服务 (Start up the NFS service)

Enable nfs service on the NFS server so that the NFS service daemon automatically starts each time the server starts:

在NFS服务器上启用nfs服务,以使NFS服务守护程序在每次服务器启动时自动启动:

# /sbin/chkconfig rpcbind on# /sbin/chkconfig nfs on

You may also manually it

您也可以手动它

# service rpcbind start # Note: always start/restart rpcbind before nfs# service nfs start

I repeat it again as it is so important: always start/restart rpcbind before nfs.

我再次重复它,因为它是如此重要: 始终在nfs之前启动/重新启动rpcbind

If the server is configured with firewall, allow the ports needed by NFS. During tests when you are not sure whether it’s the firewall settings that causes problems, you may try to flush the iptables rules by # iptables -F and enable it back after you are sure NFS service is working fine and debug the firewall settings.

如果服务器配置有防火墙,请允许NFS所需的端口。 在测试期间,如果不确定是不是引起问题的防火墙设置,可以尝试通过# iptables -F刷新iptables规则,并在确定NFS服务可以正常工作并调试防火墙设置之后将其重新启用。

客户端幻灯片配置 (Client-slide configuration)

软件包安装 (Package installation)

Install the nfs-utils package:

安装nfs-utils软件包:

# yum nfs-utils

启动rpcbind服务 (Start the rpcbind service)

Start the service needed by NFS:

启动NFS所需的服务:

# service rpcbind restart

You may also set it to start automatically

您也可以将其设置为自动启动

# chkconfig rpcbind on

挂载NFS目录 (Mount the NFS directory)

You can mount the NFS directory to the mount point:

您可以将NFS目录挂载到挂载点:

# mount NFS_SERVER:/home/userdir MOUNT_POINT

where NFS_SERVER is the NFS server’s address, and MOUNT_POINT is the local mount point on the client side for the NFS directory.

其中NFS_SERVER是NFS服务器的地址,而MOUNT_POINT是客户端在NFS目录上的本地安装点。

You may also consider using autofs on top of NFS as described in .

您还可以考虑使用NFS之上的autofs,如 。

NFS调试技巧 (NFS debugging tips)

When you find problems, these tips may give you some clues on what’s wrong and the results here are useful when you ask some others for help.

当您发现问题时,这些技巧可能会为您提供一些错误提示,当您向其他人寻求帮助时,此处的结果将非常有用。

On the server side

在服务器端

# service nfs status# service rpcbind status# rpcinfo -p localhost# showmount -e localhost# netstat -ptuln# iptables -S

On the client side

在客户端

# showmount -e $SERVER_IP# rpcinfo -p $SERVER_IP# iptables -S

翻译自:

nfs 服务器和客户端区别

转载地址:http://mblwd.baihongyu.com/

你可能感兴趣的文章
十四. k8s资源需求和限制, 以及pod驱逐策略
查看>>
三. k8s基本操作以及pod存活以及可用性验证钩子
查看>>
五. k8s--service学习笔记
查看>>
二. k8s安装过程
查看>>
jenkins pipeline 使用遇到的问题
查看>>
四. k8s--pod控制器
查看>>
一. python数据结构与算法
查看>>
django模型内部类meta解释
查看>>
v-for(:key)绑定index、id、key的区别
查看>>
el-tree文本内容过多显示不完全问题(解决)
查看>>
el-table翻页序号不从1开始(已解决)
查看>>
vue-cil 打包爬坑(解决)
查看>>
定位问题 vue+element-ui+easyui(兼容性)
查看>>
四叶草(css)
查看>>
nginx——前端服务环境
查看>>
vue+element-ui 字体自适应不同屏幕
查看>>
Vue 循环为选中的li列表添加效果
查看>>
vue创建脚手架 cil
查看>>
ArcGIS分支版本化( Branch Versioning )技术介绍
查看>>
scrapy过滤重复数据和增量爬取
查看>>