使用redhat linux 6.2 模拟nas存储 (搭建NFS服务 共享某文件夹)
Linux ip地址:6.198
注意:安装linux时选择安装desktop版
 
linux服务搭建之:NFS   :network file system  网络文件系统
作用:文件共享  存储共享
服务端:服务搭建
 
注:NFS服务在安装系统的时候已经安装完毕,类似于ssh
可通过如下命令测试:
/etc/init.d/nfs start
启动nfs服务 /etc/init.d/rpcbind start 注:NFS依赖于rpcbind服务
Mkdir /nas 根目录下创建文件夹名为nas 便于共享
 
vim /etc/exports
/nas  *(rw,sync)   将nas文件夹共享给所有人
/etc/init.d/nfs restart 重启服务 
 
chmod  777  /nas 给nas所有访问权限
 
需要:
关闭防火墙:
iptables   -F  清空所有的防火墙策略
/etc/init.d/iptables    save  保存
关闭selinux:
setenforce 0  临时关闭
 
 
永久关闭selinux (可选)
vim /etc/selinux/config
将 SElinux =  disabled  重启生效
 
至此NFS服务搭建完成!!

相关文章:

  • 2021-09-29
  • 2021-10-21
  • 2022-12-23
  • 2021-11-21
  • 2021-11-09
  • 2021-12-20
猜你喜欢
  • 2021-04-25
  • 2021-11-02
  • 2022-12-23
  • 2021-10-16
  • 2021-12-24
  • 2022-12-23
相关资源
相似解决方案