NFS

浪子不回头ぞ 提交于 2019-11-28 00:24:35

NFS:网络文件系存在局域网中,不太安全 无固定端口号 随机端口10000以上

端口号范围:0-65535

NFS文件共享  本地目录映射到远端 cs架构

S(服务器):设置一个共享目录     C:挂载使用   rpc端口号111

服务器:nfs服务共享

mkdir /data  #创建一个共享目录

vim  /etc/exports     #进里面编辑闯将

/data   服务器允许访问网段信息 /24(rw)给与读写权限

yum -y install nfs-utils  rpcbind   安装所需软件

systemctl  restart  nfs rpcbind #启动服务

进入测试机客户端

[root@localhost ~]# showmount -e 192.168.100.122
Export list for 192.168.100.122:    #查看信息

[root@localhost ~]# mount 192.168.100.122:/data /opt/  #挂载到/opt下

/etc/fsab   设置开机自动挂载  vim /etc/fstab

服务下的/data下的目录共享 修改里面的内容在客户端中的opt文件夹下可以发现

[root@localhost data]# mkdir -v test2.txt
mkdir: 已创建目录 "test2.txt"
[root@localhost data]# ls
test1.txt test2.txt
[root@localhost data]# ls -a
. .. test1.txt test2.txt
[root@localhost data]#

[root@localhost ~]# ls /opt
test1.txt test2.txt

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!