nfs server and client
2024-10-01 04:33:37
系统环境: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
最新文章
- ns3 print 丢包内容的两种方法
- 解决 U 盘写保护的问题
- Winform 文本框多线程赋值
- mysql中OPTIMIZE TABLE的作用
- [转]两种Sigma-Delta ADC SNR仿真方法
- MySQL数据库中字符集的问题
- Android开发5大布局方式详解
- 最短路径算法——Dijkstra,Bellman-Ford,Floyd-Warshall,Johnson
- php框架
- MySQL 开放局域网
- java反射机制入门04
- 1、Cocos2dx 3.0游戏开发三找一小块前言
- Android ListView多布局讲解
- 201521123014 《Java程序设计》第6周学习总结
- JS判断手机还是电脑访问网站
- Visual Studio For MacOS 踩坑记(二)
- Vue项目之背景图片打包后路径错误
- [Codeforces721E]Road to Home
- 计算概论(A)/基础编程练习1(8题)/4:求一元二次方程的根
- Linux的管道命令
热门文章
- js 检查内容是否为空
- crypto-js RC4和hash_hmac运用
- Arrays工具类的使用
- SharePoint Designer 2013 开启新式验证(Modern Authentication)
- PAT_A1141#PAT Ranking of Institutions
- Lua的string库函数、lua中string的模式匹配
- Linux的环境配置文件----.bashrc文件
- [Usaco2004 Open]Cube Stacking 方块游戏
- E - Just a Hook
- Android之——自己主动挂断电话的实现