Linux-NFS 安装配置

1、查看NFS组件是否已经安装

[root@localhost ~]# rpm -qa |grep nfs
nfs4-acl-tools-0.3.3-6.el6.x86_64
nfs-utils-1.2.3-39.el6.x86_64
nfs-utils-lib-1.1.5-6.el6.x86_64
[root@localhost ~]# 
[root@localhost ~]# rpm -qa |grep rpcbind
rpcbind-0.2.0-11.el6.x86_64_

2、创建共享目录

[root@localhost ~]# mkdir /backup

3、修改exports

[root@localhost ~]# vim /etc/exports 
/backup *(rw,sync,no_root_squash)*

4、挂载

mount -t nfs -o rw 10.88.88.200:/backup /backup

5、开机自动挂载

[root@localhost backup]# vim /etc/fstab 


/etc/fstab
Created by anaconda on Fri Apr 28 21:16:06 2017

Accessible filesystems, by reference, are maintained under '/dev/disk'
See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info

/dev/mapper/centos-root /                       xfs     defaults        1 1
UUID=40018f08-6e7d-45c7-a143-2ad8bde10d2f /boot                   xfs     defaults
   1 2
/dev/mapper/centos-swap swap                    swap    defaults        0 0
10.88.88.200:/backup    /backup         nfs     defaults        0 0 

发表评论

电子邮件地址不会被公开。 必填项已用*标注

返回主页看更多
狠狠的抽打博主 支付宝 扫一扫