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

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

转载于:https://blog.51cto.com/11773959/2076150

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值