信创服务器下搭建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
相关推荐
Li-Yongjun34 分钟前
5G-A:开启通信与行业变革的新时代
运维·服务器·5g
待什么青丝43 分钟前
【Ubuntu】摸鱼技巧之虚拟机环境复制
linux·运维·ubuntu
中杯可乐多加冰1 小时前
采用Bright Data+n8n+AI打造自动化新闻助手:每天5分钟实现内容日更
运维·人工智能·自动化·大模型·aigc·n8n
东临碣石822 小时前
【AI论文】SWE-rebench:一个用于软件工程代理的任务收集和净化评估的自动化管道
运维·自动化
LB21122 小时前
Maven(黑马)
linux·服务器·maven
拍客圈3 小时前
宝塔专属清理区域,宝塔清理MySQL日志(高效释放空间)
运维·服务器
Mikhail_G3 小时前
Python应用for循环临时变量作用域
大数据·运维·开发语言·python·数据分析
Stardep3 小时前
Linux下目录递归拷贝的单进程实现
linux·运维·服务器·实验
hawk2014bj3 小时前
KVM 安装 Ubuntu 22
linux·运维·ubuntu
nako_sayuri3 小时前
Linux进程间通信----简易进程池实现
linux·服务器·进程池