当前位置: 首页 > news >正文

NFS磁盘共享

步骤:

注意事项‌:确保服务端防火墙关闭,或者允许2049端口通信,客户端需具备读写权限。

服务器端

安装NFS服务器:

sudo apt-get install nfs-kernel-server  # Debian/Ubuntu
sudo yum install nfs-utils             # CentOS/RHEL

配置NFS导出:

编辑/etc/exports文件,添加要共享的目录和客户端权限。例如:

/path/to/share *(rw,sync,no_subtree_check)

启动NFS服务并使能开机启动:

sudo systemctl start nfs-server
sudo systemctl enable nfs-server

客户端

在客户端安装NFS客户端:

sudo apt-get install nfs-common  # Debian/Ubuntu
sudo yum install nfs-utils       # CentOS/RHEL

挂载NFS共享:

sudo mount -t nfs server_ip:/path/to/share /local/mount/point


------------------例:

NFS服务端‌


在服务端安装nfs-utils和rpcbind:

sudo yum install nfs-utils rpcbind
sudo systemctl start rpcbind
sudo systemctl enable rpcbind
sudo systemctl start nfs-server
sudo systemctl enable nfs-server

配置共享目录:编辑/etc/exports文件,添加共享路径及权限配置

/data/shared 192.168.1.100(rw,sync,no_root_squash)

重新加载NFS服务:

sudo exportfs -ra

NFS客户端

在客户端安装nfs-utils:

sudo yum install nfs-utils

挂载共享目录:

sudo mount -t nfs 192.168.1.100:/data/shared /mnt/nfs_share

设置自动挂载(可选):编辑/etc/fstab文件:

192.168.1.100:/data/shared /mnt/nfs_share nfs defaults 0 0。


文章转载自:
http://bilinguist.hfytgp.cn
http://bbc.hfytgp.cn
http://apomictic.hfytgp.cn
http://anthelion.hfytgp.cn
http://brachial.hfytgp.cn
http://bandspreading.hfytgp.cn
http://antiquary.hfytgp.cn
http://autoconditioning.hfytgp.cn
http://bore.hfytgp.cn
http://bushelbasket.hfytgp.cn
http://cannabinol.hfytgp.cn
http://antenumber.hfytgp.cn
http://calamanco.hfytgp.cn
http://actaeon.hfytgp.cn
http://bangle.hfytgp.cn
http://antipode.hfytgp.cn
http://burglar.hfytgp.cn
http://babirusa.hfytgp.cn
http://argenteous.hfytgp.cn
http://bravissimo.hfytgp.cn
http://bechic.hfytgp.cn
http://blastomycetes.hfytgp.cn
http://beekeeping.hfytgp.cn
http://angiosarcoma.hfytgp.cn
http://basidiomycetous.hfytgp.cn
http://anisocercal.hfytgp.cn
http://arbutus.hfytgp.cn
http://arthrosporic.hfytgp.cn
http://cargador.hfytgp.cn
http://carnie.hfytgp.cn
http://www.dtcms.com/a/281784.html

相关文章:

  • 基础专有术语
  • Model Control Protocol 一种开放的应用层协议,让大模型与工具能够协调配合起来,了解他的定义、定位、组成及实现机制...
  • 手提式干粉灭火器检查工作,如何做到可执行、可追溯、可管理?
  • 移动碰撞法 ——套料排版算法——CAD c#
  • java基础(day08)-面向对象
  • Redis 高频面试题
  • 【删库跑路】一次删除pip的所有第三方库
  • vllm本地部署qwen3-4b
  • 场景设计题+智力题
  • windows下安装difi(无docker desktop版)
  • 7.15 腾讯云智面经整理
  • Wiz笔记二次开发
  • AI大模型开发架构设计(22)——LangChain的大模型架构案例实战
  • 记忆力训练day41
  • 1-Nodejs介绍与安装
  • 基于STM32的智能火灾报警系统设计
  • 【人工智能99问】激活函数有哪些,如何选择使用哪个激活函数?(5/99)
  • ADAU系列DSP用MCU来做控制,怎么去理解这个逻辑
  • Vue3 + MapLibre 地图管理工具 useMap 使用指南
  • 牛客:HJ22 汽水瓶[华为机考][数字处理]
  • 基于Sentinel-1雷达数据的洪水动态监测(附完整GEE代码)
  • 深入理解红锁
  • Vue3入门-指令补充
  • 学习C++、QT---26(QT中实现记事本项目实现文件路径的提示、C++类模板、记事本的行高亮的操作的讲解)
  • 面向对象与面向过程、函数式编程
  • C++回顾 Day8
  • 【时时三省】(C语言基础)通过指针引用多维数组
  • 【09】MFC入门到精通——MFC 属性页对话框的 CPropertyPage类 和 CPropertySheet 类
  • burpsuite使用中遇到的一些问题(bp启动后浏览器无法连接)/如何导入证书
  • css实现烧香效果