信创服务器下搭建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
相关推荐
狄加山67529 分钟前
Linux Input子系统与驱动开发实战
linux·运维·驱动开发
小刘|30 分钟前
对称加密以及非对称加密
linux·运维·网络
Levin__NLP_CV_AIGC2 小时前
更新 / 安装 Nvidia Driver 驱动 - Ubuntu - 2
linux·运维·ubuntu
DLR-SOFT3 小时前
Windows远程访问Ubuntu的方法
linux·运维·ubuntu
咸鱼2333号程序员3 小时前
Linux ifconfig命令详解
linux·服务器·网络
秦jh_3 小时前
【Linux网络】应用层协议HTTP
linux·运维·服务器·网络·网络协议·tcp/ip·http
何怀逸4 小时前
安装 Docker
运维·docker·容器
杰克逊的日记4 小时前
运维体系架构规划
运维·架构
pp-周子晗(努力赶上课程进度版)5 小时前
【计算机网络-数据链路层】以太网、MAC地址、MTU与ARP协议
服务器·网络·计算机网络
开利网络6 小时前
开放的力量:新零售生态的共赢密码
大数据·运维·服务器·信息可视化·重构