NFS

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

 

posted @ 2019-08-20 14:03  皮皮猪!  阅读(137)  评论(0编辑  收藏  举报