首页 > 其他 > 详细

两台台CentOS release 6.5 (Final)*64服务器搭建nfs——笔记

时间:2018-03-02 15:31:51      阅读:227      评论:0      收藏:0      [点我收藏+]
Server端
检查环境
#cat /etc/redhat-release
#uname -m
#ifconfig|awk -F"[ :]+" ‘NR==2{print $4}‘
192.168.56.6

装服务
#yum install -y rpcbind nfs-utis
#rpm -qa |egrep "rpcbind|nfs-utils"
起服务
#/etc/init.d/rpcbind start
#/etc/init.d/rpcbind status
#rpcinfo -p localhost
#chkconfig --level 3 rpcbind on
#chkconfig --list|grep rpcbind

#/etc/init.d/nfs start
#/etc/init.d/nfs status
#chkconfig --level 3 nfs on
#chkconfig --list|grep nfs

配置
#mkdir /data
#cat /var/lib/nfs/etab
#useradd -u 555 -g 555 oldboy
#vim /etc/exports
/data 192.168.56.0/24(rw,sync,all_squash,anonuid=555,anongid=555)
#exportfs -rv
#grep 555 /etc/passwd
#chown -R old.old /data
#showmount -e localhost

Client
检查
#cat /etc/redhat-release
#uname -m
#ifconfig|awk -F"[ :]+" ‘NR==2{print $4}‘
192.168.56.3

#yum install -y rpcbind
#rpm -qa |grep "rpcbind"

#/etc/init.d/rpcbind start
#/etc/init.d/rpcbind status
#rpcinfo -p 192.168.56.6
#chkconfig --level 3 rpcbind on
#chkconfig --list|grep rpcbind
配置
#ping&&telnet 192.168.56.6 111
#showmount -e 192.168.56.6
#mkdir /data0
#vim /etc/rc.local
#mount -t nfs 192.168.56.6:/data /data0
#source /etc/rc.local
#df -hT

测试
分别在server和clint间建文件删除文件

单词:squash 压缩 指能把共享文件的用户转换成匿名用户
anonuid 匿名uid :上述匿名用户的uid
anongid 匿名gid:上述匿名用户的gid

两台台CentOS release 6.5 (Final)*64服务器搭建nfs——笔记

原文:http://blog.51cto.com/11773959/2076150

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!