nfs服务

任务要求

架设一台NFS服务器,并按照以下要求配置

1、开放/nfs/shared目录,供所有用户查询资料

2、开放/nfs/upload目录,为192.168.xxx.0/24网段主机可以上传目录,

并将所有用户及所属的组映射为nfs-upload,其UID和GID均为210

3、将/home/tom目录仅共享给192.168.xxx.xxx这台主机,并只有用户tom可以完全访问该目录

服务器端配置

安装nfs

yum install -y nfs-utils rpcbind

systemctl enable rpcbind

systemctl enable nfs-server

创建共享目录

mkdir -p /nfs/shared

mkdir -p /nfs/upload

mkdir -p /home/tom

创建文档要求的 UID/GID:

groupadd -g 210 nfs-upload

useradd -u 210 -g 210 nfs-upload

chown -R nfs-upload:nfs-upload /nfs/upload

配置 NFS 主配置文件

/nfs/shared *(ro)

/nfs/upload 192.168.203.0/24(rw,all_squash,anonuid=210,anongid=210)

/home/tom 192.168.203.130

应用配置

exportfs -r

systemctl restart nfs-server

挂载客户端

mount -t nfs 192.168.203.129:/nfs/shared /mnt

mount -t nfs 192.168.203.129:/nfs/upload /mnt

mount -t nfs 192.168.203.129:/home/tom /mnt

相关推荐
DianSan_ERP5 天前
电商API接口全链路监控:构建坚不可摧的线上运维防线
大数据·运维·网络·人工智能·git·servlet
西岸行者5 天前
学习笔记:SKILLS 能帮助更好的vibe coding
笔记·学习
呉師傅5 天前
火狐浏览器报错配置文件缺失如何解决#操作技巧#
运维·网络·windows·电脑
starlaky5 天前
Django入门笔记
笔记·django
勇气要爆发5 天前
吴恩达《LangChain LLM 应用开发精读笔记》1-Introduction_介绍
笔记·langchain·吴恩达
悠哉悠哉愿意5 天前
【单片机学习笔记】串口、超声波、NE555的同时使用
笔记·单片机·学习
勇气要爆发5 天前
吴恩达《LangChain LLM 应用开发精读笔记》2-Models, Prompts and Parsers 模型、提示和解析器
android·笔记·langchain
2501_946205525 天前
晶圆机器人双臂怎么选型?适配2-12寸晶圆的末端效应器有哪些?
服务器·网络·机器人
linux kernel5 天前
第七部分:高级IO
服务器·网络
数字护盾(和中)5 天前
BAS+ATT&CK:企业主动防御的黄金组合
服务器·网络·数据库