nfs协议做图片共享

准备工作:

假设源端IP:10.10.70.72  共享目录 /temp/share

目标端IP:10.10.71.193   mount节点目录/temp/share

配置工作:

1.、源端:在源端服务器上的/etc/exports 文件中,加入

/temp/share  10.10.70.72/8(rw,no_root_squash)

保存并退出

2、重启nfs服务:/bin/systemctl restart  nfs.service

3、开启portmap服务:/bin/systemctl restart  portmap.service

4.、查看源端是否给出了共享目录:showmount -e

一切正常后,可以到目标端去配置

 

目标端不需要配置,只需执行mount命令即可

在mount之前,先得保证目标端的 portmap 服务开启

否则mount会很长一段时间,最后报mount.nfs: Input/output error

在mount之前可以先查看一下源端是否给出了共享目录 showmount -e 10.10.4.237

一切正常后可以执行mount命令了:

mount -t nfs 10.10.4.237:/temp/share   /temp/share

 

 

mount -t nfs -o nolock,nfsvers=3,vers=3 10.10.4.237:/data/apache-tomcat/data/apache-tomcat-image-7070/webapps/ROOT/upload  /data/apache-tomcat/data/apache-tomcat-platform-9090/webapps/ROOT/upload

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值