信创服务器下搭建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
相关推荐
闲云自留地5 分钟前
动手玩 Nova:Hypervisor、主机聚合、可用分区、虚拟机生命周期实操
运维·架构·openstack
binqian39 分钟前
【linux】OpenSSH升级文档
linux·运维·网络
吴声子夜歌1 小时前
Shell编程——if条件语句
linux·运维·shell
和裕1 小时前
蜂窝板 vs 七层瓦楞重型纸箱:大件工业设备运输性能与成本全对比
大数据·运维·网络·人工智能·算法
Dawn-bit1 小时前
Linux 运维基础扩展:跳板机、堡垒机与物理服务器全流程
linux·运维·服务器·云计算·运维开发
新时代牛马1 小时前
Linux 定时任务:crontab、anacron 与systemd timer
linux·运维·服务器
IT摆渡者2 小时前
1panel 配置申请手动解析网站SSL证书
服务器·网络协议·ssl
疯狂打码的少年2 小时前
【计算机网络】子网掩码与子网划分计算(含CIDR表示法)
服务器·笔记·计算机网络·php
网硕互联的小客服3 小时前
怎样在CMD里用chkntfs /x C: 命令来取消磁盘自检?——原理与实践全解
运维·服务器·网络
布莱克6053 小时前
Linux 常用命令详解:从入门到实战
linux·运维·服务器