信创服务器下搭建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
相关推荐
asdfg1258963几秒前
为什么要在出口路由器router配置NAT与默认路由
运维·网络·计算机网络
当归102426 分钟前
SQL Server死锁排查实战指南
java·服务器·网络
bug攻城狮43 分钟前
Skopeo 工具介绍与 CentOS 7 安装指南
linux·运维·centos
宇宙第一小趴菜1 小时前
08 修改自己的Centos的软件源
linux·运维·centos
qinyia1 小时前
用 Wisdom SSH 轻松实现服务器自动化任务调度
服务器·自动化·ssh
bug攻城狮1 小时前
彻底禁用 CentOS 7.9 中 vi/vim 的滴滴声
linux·运维·服务器·centos·vim
苹果醋31 小时前
数据库索引设计:在 MongoDB 中创建高效索引的策略
java·运维·spring boot·mysql·nginx
XMYX-01 小时前
Linux 物理机如何区分 SSD 与 HDD ——以 DELL PERC H730 Mini 为例
linux·运维
yongui478343 小时前
CentOS系统如何查看当前内存容量
linux·运维·centos
xzq_java3 小时前
CentOS操作系统虚拟机安装以及连接工具下载和远程连接工具远程连接
linux·运维·centos