NFS主要用于不同操作系统之间的文件共享
[root@localhost ~]# yum groupinstall nfs-file-server -y
[root@localhost nfs]# cat /etc/exports
/nfs 192.168.122.0/24(rw,sync)
(ro,sync)
*.example.com(rw,sync)
1 /etc/init.d/nfs restart
rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused)
解决办法:
1 /etc/init.d/rpcbind restart
2 #/etc/init.d/rpcbind start
[cc@bogon ~]$ showmount -e 192.168.122.44
clnt_create: RPC: Port mapper failure - Unable to receive: errno 113 (No route to host)
关掉server的火墙
chmod 777 /nfs
Export list for 192.168.122.44:
/nfs 192.168.122.0/24
mount -t nfs 192.168.122.44:/nfs /mnt
可以设置开机自动挂载:vim /etc/fstab
192.168.122.44:/nfs /mnt nfs defautls 0 0
本文转自 369蓝宝 51CTO博客,原文链接:http://blog.51cto.com/3739387/1158455,如需转载请自行联系原作者