系统环境:Centos7.3

ip1:10.0.0.1

ip2:10.0.0.2

检测是否安装NFS服务

rpm -qa | grep   nfs

rpm  -qa|grep    nfs

安装NFSserver

yum  -y   install    nfs-utils    rpcbind

服务器配置(10.0.0.1)

创建共享目录并设置权限(/mnt/data)

mkdir  -p  /mnt/data

vim   /etc/exports

/mnt/data    10.0.0.0/24(rw,no_root_squash,no_all_squash,sync)

/opt/filestore      *(insecure,rw,no_root_squash)

启动NFSserverfuwu

systemctl enable   rpcbind.service

systemctl enable   nfs-server.service

systemctl   restart    nfs

systemctl    status     nfs

查看 RPC 服务的注册状况

rpcinfo -p   localhost

检测NFS是否联机

showmount -e localhost

客户端配置(10.0.0.2)

安装NFS client服务

yum  -y  install   nfs-utils

创建挂载目录

mkdir   /eason

查看服务器抛出的共享目录信息

showmount    -e    10.0.0.1

为了提高NFS的稳定性,使用TCP协议挂载,NFS默认用UDP协议

mount   -t nfs   10.0.0.1:/mnt/data    /eason   -o   proto=tcp -o nolock

mount   -t nfs   192.168.22.204:/opt/filestore /opt/weixins2/tomcat2/webapps/filestore     -o     proto=tcp    -o    nolock

测试本机

df   -h

服务器端(/mnt/data)

echo "test"  > test.txt

客户端(/eason)

cat    /eason

最新文章

  1. ns3 print 丢包内容的两种方法
  2. 解决 U 盘写保护的问题
  3. Winform 文本框多线程赋值
  4. mysql中OPTIMIZE TABLE的作用
  5. [转]两种Sigma-Delta ADC SNR仿真方法
  6. MySQL数据库中字符集的问题
  7. Android开发5大布局方式详解
  8. 最短路径算法——Dijkstra,Bellman-Ford,Floyd-Warshall,Johnson
  9. php框架
  10. MySQL 开放局域网
  11. java反射机制入门04
  12. 1、Cocos2dx 3.0游戏开发三找一小块前言
  13. Android ListView多布局讲解
  14. 201521123014 《Java程序设计》第6周学习总结
  15. JS判断手机还是电脑访问网站
  16. Visual Studio For MacOS 踩坑记(二)
  17. Vue项目之背景图片打包后路径错误
  18. [Codeforces721E]Road to Home
  19. 计算概论(A)/基础编程练习1(8题)/4:求一元二次方程的根
  20. Linux的管道命令

热门文章

  1. js 检查内容是否为空
  2. crypto-js RC4和hash_hmac运用
  3. Arrays工具类的使用
  4. SharePoint Designer 2013 开启新式验证(Modern Authentication)
  5. PAT_A1141#PAT Ranking of Institutions
  6. Lua的string库函数、lua中string的模式匹配
  7. Linux的环境配置文件----.bashrc文件
  8. [Usaco2004 Open]Cube Stacking 方块游戏
  9. E - Just a Hook
  10. Android之——自己主动挂断电话的实现