yum -y install nfs
[root@iZ25o0ipjpmZ /]# /etc/init.d/nfs start Starting NFS services: [ OK ] Starting NFS quotas: Cannot register service: RPC: Unable to receive; errno = Connection refused rpc.rquotad: unable to register (RQUOTAPROG, RQUOTAVERS, udp). [FAILED] Starting NFS mountd: rpc.mountd: svc_tli_create: could not open connection for udp6 rpc.mountd: svc_tli_create: could not open connection for tcp6 rpc.mountd: svc_tli_create: could not open connection for udp6 rpc.mountd: svc_tli_create: could not open connection for tcp6 rpc.mountd: svc_tli_create: could not open connection for udp6 rpc.mountd: svc_tli_create: could not open connection for tcp6 [FAILED] Starting NFS daemon: rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused) rpc.nfsd: address family inet6 not supported by protocol TCP rpc.nfsd: unable to set any sockets for nfsd [FAILED]
解决:
[root@iZ25o0ipjpmZ /]# /etc/init.d/rpcbind start Starting rpcbind: [ OK ] [root@iZ25o0ipjpmZ /]# /etc/init.d/rpcidmapd start Starting RPC idmapd: [ OK ] [root@iZ25o0ipjpmZ /]# /etc/init.d/nfs start Starting NFS services: [ OK ] Starting NFS quotas: [ OK ] Starting NFS mountd: rpc.mountd: svc_tli_create: could not open connection for udp6 rpc.mountd: svc_tli_create: could not open connection for tcp6 rpc.mountd: svc_tli_create: could not open connection for udp6 rpc.mountd: svc_tli_create: could not open connection for tcp6 rpc.mountd: svc_tli_create: could not open connection for udp6 rpc.mountd: svc_tli_create: could not open connection for tcp6 [ OK ] Starting NFS daemon: rpc.nfsd: address family inet6 not supported by protocol TCP [ OK ] [root@iZ25o0ipjpmZ /]# [ OK ]
RH系操作系统在6.0版本之后没有portmap服务控制rpc的启动,由于NFS和nfslock的启动需要向rpc进行注册,rpc不启动的话就会报错。
解决方法:启动rpcbind&rpcidmap