标签:NFS
Server端装服务
#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——笔记
标签:NFS
原文地址:http://blog.51cto.com/11773959/2076150