转载来自:https://www.cnblogs.com/modestmt/p/4540818.html
(1)报错如下:
.....
+ connect_to_port 111
+ PORT=111
+ python -c 'import socket; import sys; s = socket.socket(socket.AF_INET); s.settimeout(5.0); s.connect((sys.argv[1], int(sys.argv[2]))); s.close();' localhost 111
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib64/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 111] Connection refused
+ '[' 1 -ne 0 ']'
+ echo 'Cannot connect to port 111.'
+ return 1
+ '[' 1 -eq 1 ']'
+ echo 'No portmap or rpcbind service is running on this host. Please start portmap or rpcbind service before attempting to start the NFS Gateway role on this host.'
+ exit 1
(2)解决办法:需要安装rpcbind:
yum install rpcbind.x86_64 -y
(3)启动服务
systemctl start rpcbind
(4)再次安装解决问题