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,如需轉載請自行聯系原作者