信创服务器下搭建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
相关推荐
长臂人猿26 分钟前
JVM常用工具:jstat、jmap、jstack
linux·运维·jvm
檀越剑指大厂2 小时前
【Linux系列】如何在 Linux 服务器上快速获取公网
linux·服务器·php
共享家95272 小时前
linux-高级IO(上)
java·linux·服务器
HWL56794 小时前
“preinstall“: “npx only-allow pnpm“
运维·服务器·前端·javascript·vue.js
门前灯6 小时前
Linux系统之iprconfig 命令详解
linux·运维·服务器·iprconfig
忧郁的橙子.6 小时前
三、k8s 1.29 之 安装2
linux·运维·服务器
huangyuchi.6 小时前
【Linux系统】动静态库的制作
linux·运维·服务器·动态库·静态库·库的简单制作
闻不多6 小时前
用llamaindex搭建GAR遇到400
android·运维·服务器
jim写博客7 小时前
Linux进程概念(四)环境地址变量
linux·运维·服务器
是小崔啊7 小时前
【Jenkins】01 - Jenkins安装
运维·jenkins