信创服务器下搭建nfs共享存储方案

一、服务端安装步骤

1、安装nfs服务(26.45)

yum -y install nfs-utils rpcbind

mkdir /data/dzda/jieshou_zip

chmod 777 /data/dzda/jieshou_zip

vim /etc/exports

/data/dzda/jieshou_zip 10.4.102.30(insecure,rw)
/data/dzda/jieshou_zip 10.4.102.148(insecure,rw)

2、启动rpcbind、启动nfs

systemctl start rpcbind
systemctl start nfs

3、系统启动时启动rpcbind、nfs服务

systemctl enable rpcbind
systemctl enable nfs

4、查看本级发布的共享目录

exportfs - rv

192.9.26.43
/data/dzda/jieshou_zip 10.4.102.77(insecure,rw)
/data/dzda/jieshou_zip 10.4.102.225(insecure,rw)

192.9.26.44
/data/dzda/jieshou_zip 10.4.102.99(insecure,rw)

192.9.26.45
/data/dzda/jieshou_zip 10.4.102.30(insecure,rw)
/data/dzda/jieshou_zip 10.4.102.148(insecure,rw)

二、客户端安装步骤

服务器5.250和服务器26.49

192.9.5.250挂载192.9.26.45(10.4.102.11)服务器的/data/dzda/jieshou_zip目录

1、安装nfs相关服务

yum -y install nfs-utils rpcbind

2、启动rpcbind、启动nfs

systemctl start rpcbind
systemctl start nfs

3、系统启动时启动rpcbind、nfs服务

systemctl enable rpcbind
systemctl enable nfs

4、挂载目录

mount -t nfs 10.4.102.11:/data/dzda/jieshou_zip /data/dzda/jieshou_zip

5、设置开机自动挂载

echo "mount -t nfs 10.4.102.11:/data/dzda/jieshou_zip /data/dzda/jieshou_zip" >> /etc/rc.local

chmod u+x /etc/rc.local

6、停止挂载(暂时不需要)

umount /data/dzda/jieshou_zip
相关推荐
熬夜苦读学习37 分钟前
Linux文件系统
linux·运维·服务器·开发语言·后端
荔枝荷包蛋6661 小时前
【网络】高级IO——Reactor版TCP服务器
运维·服务器
GGGGGGGGGGGGGG.2 小时前
hapxory-ACL基础介绍及案例
运维·服务器·网络
黑牛先生2 小时前
【Linux】匿名管道
linux·运维·服务器
流星白龙2 小时前
【Linux】35.封装 UdpSocket(2)
linux·运维·windows
是码农没错了2 小时前
银河麒麟系统安装mysql5.7【亲测可行】
linux·运维·kylin
Java Fans4 小时前
微信小程序——访问服务器媒体文件的实现步骤
服务器·微信小程序·小程序
技术小齐5 小时前
网络运维学习笔记 017HCIA-Datacom综合实验01
运维·网络·学习
yourkin6665 小时前
HTTPS(下)
服务器·网络协议·https
KingDol_MIni5 小时前
Spring Boot 集成 T-io 实现客户端服务器通信
java·服务器·spring boot