REST is not enabled. use --rest to turn on.

使用浏览器访问mongodb管理员接口:http://ipaddress:28017/_commands时页面提示如下:

REST is not enable

我启动mongodb命令如下:

Shell代码   收藏代码
  1. [root@localhost mongodb]# ./bin/mongod -f mongodb.conf  

页面提示是REST没有开启,根据提示修改了启动Mongodb的命令,加上了--rest,如下:

Shell代码   收藏代码
  1. [root@localhost mongodb]# ./bin/mongod -f mongodb.conf --rest  

启动mongodb后再次访问:http://ipaddress:28017/_commands 页面就能正常访问了。

猜你喜欢

转载自zzc1684.iteye.com/blog/2224689