The company uses MongoDB to do the database function, the first use, so I went to study the next MongoDB website and related information, the local Windows environment to build a simple MongoDB database, words not to say, into the topic
First, download MongoDB1, MONGODB official website: Click Open 2,: MongoDB download
MongoDB website provides a lot of download version, now the latest is 3.2 version, and there are Linux, also have Windows different operating systems, I am the win 64-bit, so downloaded mongodb-win32-x86_ 64-2008plus-ssl-3.2.10
Second, after installing MongoDB1, download, double-click Install
2. Click Next to select Custom installation (it is best to specify your own installation directory)
3, change the installation path, specify your own installation directory (here you can first build the directory)
4, after changing the directory, click Next, then install installation, installation completed, click Finish, the installation is complete
Third, configure MongoDB
After MongoDB installation, you also need to configure the log directory and data directory , so as to normal use, the following are the steps to configure
1, in the installation directory of MongoDB, create log directory and data directory
2. Setting up MongoDB operating environment
Open the Windows CMD environment, go to your MongoDB installation directory bin directory, and then configure the MongoDB log directory and Data directory
(1) Specify the log directory command for MongoDB (it is best to use absolute paths here):
Mongod--logpath D:\NoSql\MongoDB\data\log\mongodb.log
(2) Specify the Data Directory command for MongoDB:
Mongod --dbpath D:\NoSql\MongoDB\data\db
Execute command, see Generate data file and port number, then MongoDB boot succeeds
(3) Here you can access the localhost:27017 on the browser, you can see MongoDB boot successful prompt
Iv. simple use of MongoDB database 1,
a different CMD environment, enter the installation bin directory of MongoDB and execute the mongo.exe command to see the test database connected to MongoDB
2, then, you can view the data table, view the database, add the deletion of the operation, is it very simple?
As for the other operation of MongoDB, please crossing yourself to find out, here This is the introduction of installation and simple use
Mongodb--windows environment installation and simple use