# yum install nfs-utils
# mkdir /storage
# cat /etc/exports
/storage *(fsid=0,rw,sync,no_root_squash,no_subtree_check,crossmnt)
# service nfs start
______________________________________________
samba 共享目录无法访问 解决方法总结
https://blog.csdn.net/runningsword/article/details/6890159?utm_medium=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.control&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.control
配置完成后使用命令
showmount -e *.*.3.1 查看共享目录
————————————————————————————————————————————————————————————————————
centos7设置共享文件夹(samba)
https://blog.csdn.net/plychoz/article/details/80737736
(三大共享文件的方法)
https://www.cnblogs.com/andriod-html5/archive/2012/05/07/2539224.html
https://blog.csdn.net/weixin_46545446/article/details/108566730 (smb共享,比较好)
安装并启动samba
[root@Kling ~]# yum -y install samba #使用yum安装samba
[root@Kling ~]# systemctl start smb nmb #启动
[root@Kling ~]# systemctl enable smb #开机自启
[root@Kling ~]# systemctl enable nmb #开机自启
防火墙放行samba
[root@Kling ~]# firewall-cmd --permanent --add-service=samba #放行samba服务
success
[root@Kling ~]# firewall-cmd --reload #重新加载防火墙
success
4,创建共享目录和用户
[root@Kling /]# mkdir /common
[root@Kling /]# useradd kouling
[root@Kling /]# smbpasswd -a kouling
[root@Kling /]# pdbedit -L #查看samba用户
kouling:1002:
修改配置文件
[common]
comment = ziliao
path = /common
allow hosts =10.1.100.0/24
writable = yes
语法检查
[root@Kling /]# testparm
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
设置权限
[root@Kling /]# chown -R 755 /common/
重启服务
[root@Kling common]# systemctl restart smb
[root@Kling common]# systemctl restart nmb
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?