LINUX NFS配置

主机:10.88.34.59  备机:10.88.34.58
1、现在主机上编写 vi /etc/exports文件
/opt/cmstemp 10.88.34.58(rw,sync,no_root_squash)  #需要将本机的哪个目录共享给哪台服务器
/opt/ftp 10.88.34.58(rw,sync,no_root_squash)
/opt/idealFileData 10.88.34.58(rw,sync,no_root_squash)
2、主机 /etc/init.d/nfs restart
3、NFS加到自动启动项  chkconfig --add nfs
4、主机查看 showmount -e localhost
5、备机mount 主机目录  mount -t nfs 10.88.34.59:/opt/ftp /opt/ftp
6、编写vim /etc/fstab 在备机重启时,自动挂载
10.88.34.59:/opt/cmstemp /opt/cmstemp nfs defaults 0 0
10.88.34.59:/opt/ftp /opt/ftp nfs defaults 0 0
10.88.34.59:/opt/idealFileData /opt/idealFileData nfs defaults 0 0
 
卸载 备机:umount /opt/ftp
重启机器,建议先重启备机在重启主机
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值