1.设定共享主机(192.168.72.129)
编辑/etc/exports,写入要共享的主机
[root@localhost ~]# cat /etc/exports
[root@localhost ~]# vi /etc/experts
2.开启nfs服务
[root@localhost ~]# service nfs start
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]
2.在另外一台主机上查看192.168.72.129中共享的文件夹
一定要关闭防火墙!!!
[root@localhost ~]# chkconfig --list | grep iptables
iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@localhost ~]# runlevel
N 3
看防火墙没关!
可以了输入showmount -e IP地址查看
[root@localhost ~]# showmount -e 192.168.72.129
Export list for 192.168.72.129:
/var/public 192.168.72.*