使用浏览器访问mongodb管理员接口: http://ipaddress:28017/_commands 时页面提示如下:
我启动mongodb命令如下:
[root@localhost mongodb]# ./bin/mongod -f mongodb.conf
页面提示是REST没有开启,根据提示修改了启动Mongodb的命令,加上了--rest,如下:
[root@localhost mongodb]# ./bin/mongod -f mongodb.conf --rest
启动mongodb后再次访问: http://ipaddress:28017/_commands 页面就能正常访问了。