由于工作需要,要在Windows server 2016环境下安装MongoDB,MongoDB在Windows环境下有两个版本,安装版和压缩版,安装板在服务器上安装到最后总报权限不足,忽略之后数据库无法使用,在网上找了很多4.0版的安装教程都没有解决问题,所以转用解压版的安装。
安装版本:mongodb-win32-x86_64-2008plus-ssl-4.0.2.zip。
安装步骤:
1.下载解压版安装包
2.解压程序到指定目录
3.单独设置一个保存数据目录,如F:\Repositories\MongoDBData
4.打开命令行,进入到程序解压目录的bin目录下
5.输入服务器启动命令,指向数据存储目录mongod --dbpath F:\Repositories\MongoDBData
6.在安装过程中会出现两个警报:
WARNING: Access control is not enabled for the database.Read and write access to data and configuration is unrestricted.
WARNING: This server is bound to localhost.Remote systems will be unable to connect to this server.Start the server w