linux 配置共享目录方法 及问题:clnt_create: RPC: Port mapper failure - Unable to receive: errno 113 (No route to host)
网上找的方法基本都对。 我遇到一个错,怎么都解决不了。 重启,改配置,检查防火墙,加防火墙策略都没有用。
[root@vodchannel01 ~]# showmount -e 172.29.xxx.xxx
clnt_create: RPC: Port mapper failure - Unable to receive: errno 113 (No route to host)

后经发现,是防火墙无法关闭,导致客户端报这个错。
解决办法是,执行如下命令 ,执行两次:
systemctl stop firewalld;pkill -f firewalld;systemctl start firewalld
然后查看防火墙状态, 再通过正常关闭就好了

--------------------------------------
以下提供linux 配置共享目录的步骤及命令:
一、服务端 操作:
yum -y install nfs-utils rpcbind
systemctl start rpcbind
systemctl start nfs
编辑nfs配置文件:
vim /etc/exports
systemctl restart rpcbind
systemctl restart nfs -重启服务注意顺序
二、客户端操作:
yum -y install nfs-utils rpcbind
systemctl start rpcbind
systemctl start nfs
之后,创建好本地目录,执行mount 挂载
mount -t nfs 192.168.10.10:/var/www/html /mnt --临时挂载
建议永久挂载:
umount /mnt --卸掉,如果前面有执行临时挂载的话
vim /etc/fstab --增加永久挂载 共享目录
增加 这条记录 192.168.10.10:/var/www/html /mnt nfs defaults,_netdev 0 0
mount -a #自动挂载fstab文件
如出现问题,一般是网络问题,必须把防火墙关闭,防火墙关闭方法见前面内容。
浙公网安备 33010602011771号