Just entered the new company, using MongoDB, so recently began to study MongoDB.
MONGO's introductory learning materials can be http://www.runoob.com/mongodb/mongodb-tutorial.html. Install MongoDB locally under WIN10:
First to the official website to download the installation package, of course, I download the official website is slow, so simply Baidu under a, version is mongo3.2, the download process can be Baidu
1. Install to the custom directory:
2. Create folders and new files 1, create directories and empty files under the installation directory:
D:\MyProgramFiles\mongoDB\Server\3.2\data database directory D:\MyProgramFiles\mongoDB\Server\3.2\logs Log storage directory D:\MyProgramFiles\mongoDB\Server\3.2\logs\mongodb.log log file D:\MyProgramFiles\mongoDB\Server\ 3.2\conf\mongodb.config configuration file
Note:
You can also configure the directory of config using the method of adding parameters at startup, as shown in:
However, the use of Config mode is recommended for easy modification;
2. configuration file Mongodb.config
dbpath=d:\myprogramfiles\mongodb\server\3.2\data #数据库路径 logpath=d:\myprogramfiles\mongodb\server\3.2 \logs\mongodb.log #日志输出文件路径 Logappend=true #错误日志采用追加模式, configuring this option after MongoDB's log is appended to the existing log file, Instead of creating a new file Journal=true #启用日志文件, quiet=true #这个选项可以过滤掉一些无用的日志信息 is enabled by default, If you need to debug use set to False port=27017 #端口号 default is 27017
Such as:
Attention:
3. Configure the MONGODB environment variables first:
4, start with the administrator mode to start cmd,
Normal Startup
Mongod--config D:\MyProgramFiles\mongoDB\Server\3.2\conf\mongodb.config
Install as a Windows service
Mongod--config D:\MyProgramFiles\mongoDB\Server\3.2\conf\mongodb.config--install
Here, the service is started
5. Open Service
Under administrator cmd,
Start the service:
net start MongoDB
To close the service:
net stop MongoDB
Then use MONGO:
WIN10+MONGODB installation Configuration