linux配置nfs

https://blog.csdn.net/yujin2010good/article/details/7672698  原理

rpm -qa|grep nfs
yum install nfs*

vi /etc/exports
/data 10.101.200.7(rw,sync)


在NFS服务器上修改/etc/sysconfig/nfs文件,将#RPCNFSDARGS="-N 4"的#号去掉即可

#启动服务
service nfs  start
service rpcbind  start


#加入启动服务列表
chkconfig --add rpcbind
chkconfig rpcbind on


chkconfig --add nfs
chkconfig nfs on


#检查
chkconfig --list |grep -E ‘nfs|rpcbind‘


[root@ip-10-101-200-10 ~]# showmount -e localhost
Export list for localhost
/data 10.101.200.7

==================================================
客户端测试
yum install showmount
service rpcbind  start
[root@ip-10-101-200-7 ~]# showmount -e 10.101.200.10
Export list for 10.101.200.10:
/data 10.101.200.7

[root@ip-10-101-200-7 ~]# mount -t nfs 10.101.200.10:/data /tmp/data
[root@ip-10-101-200-7 ~]# df
Filesystem           1K-blocks     Used Available Use% Mounted on
/dev/mapper/vg_testwm1-lv_root
                      38186488 20007708  16233304  56% /
tmpfs                  4030368        0   4030368   0% /dev/shm
/dev/sda1               487652    38405    423647   9% /boot
10.101.200.10:/data   78810112  3481088  71320576   5% /tmp/data

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值