CentOS 6.8下NFS安装配(linux上nas挂载)

(失败)

 

主库ip:192.168.191.5

 

从库ip:192.168.191.6

 

1.yum install nfs-utils rpcbind

2.vim /etc/exports /data1/activemq/ 192.168.191.6(rw,sync) ===(/data1/activemq/:192.168.220.103(rw,sync,no_root_squash,no_all_squash))

 

3. 启动rpcbind服务

 

service rpcbind restart

 

 

4. 启动nfs服务

 

service nfs restart

 

 

5.把这两个服务设置自启动

 

chkconfig --level 35 nfs on

chkconfig --level 35 rpcbind on

 

 

 

6.在从库192.168.191.6 上挂载共享目录:

 

mount -t nfs 192.168.191.5:/data1/activemq /data1/activemq ============(mount -t nfs192.168.220.69: /data1/activemq /data1/activemq)

 

 

 

7.设置从库重启系统时自动挂载:

 

vim /etc/rc.d/rc.local

加入:mount -t nfs 192.168.191.5: /data1/activemq /data1/activemq

wq保存退出

 

 

=========================df -Th 产看挂载情况

 

 

 

8.注意关闭防火墙

service iptables stop

 

 

(成功)《《=======CentOS 6.8下NFS安装配============》》

=======================================================

服务端

1.yum -y install nfs-utils rpcbind

2.mkdir /usr/local/test

3.vi /etc/exports

#增加一行:

/usr/local/test/ 192.168.191.6(rw,no_root_squash,no_all_squash,sync)

4.exportfs -r

5.service rpcbind restart

6.service nfs restart

客户端

1.mkdir /usr/local/test

2.注意关闭防火墙

service iptables stop

3、测试挂载:

showmount -e 192.168.191.5

4.mount -t nfs 192.168.191.5:/usr/local/test /usr/local/test

5.mount

6.测试:

客户端生成一个文件:

[root@centos2 /]# cd /usr/local/test/

[root@centos2 test]# echo "hello nfs test">>test

[root@centos2 test]# ll

7.服务端检查:

[root@centos2 /]# cd /usr/local/test/

[root@centos2 test]# ll

8.=========================df -Th 产看挂载情况

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值