On this page本页内容
MongoDB binaries, 默认情况下,MongoDB二进制文件mongod
and mongos
, bind to localhost by default. mongod
和mongos
绑定到本地主机。If the 如果为二进制文件设置了net.ipv6
configuration file setting or the --ipv6
command line option is set for the binary, the binary additionally binds to the localhost IPv6 address.net.ipv6
配置文件设置或--ipv6
命令行选项,则二进制文件会额外绑定到本地主机ipv6地址。
If the 如果为二进制文件设置了net.ipv6
configuration file setting or the --ipv6
command line option is set for the binary, the binary additionally binds to the localhost IPv6 address.net.ipv6
配置文件设置或--ipv6
命令行选项,则二进制文件会额外绑定到本地主机ipv6地址。
To bind to all IPv4 addresses, you can specify the bind ip address of 要绑定到所有IPv4地址,可以将绑定ip地址指定为0.0.0.0
. 0.0.0.0
。To bind to all IPv4 and IPv6 addresses, you can specify the bind ip address of 要绑定到所有IPv4和IPv6地址,可以指定绑定ip地址::,0.0.0.0
or alternatively, use the new net.bindIpAll
setting or the new command-line option --bind_ip_all
.::,0.0.0.0
,或者使用新的net.bindIpAll
设置或新的命令行选项--bind_ip_all
。