Notes on using MongoDB

One: Download

      On the MongoDB official website  , we found that there are 32bit and 64bit, which depends on your system, but here are two points to note:

          ①: According to industry rules, even numbers are "stable version" (such as: 1.6.X, 1.8.X), and odd numbers are "development version" (such as: 1.7.X, 1.9.X), the difference between these two versions I believe everyone You know it.

          ②: 32bit mongodb can only store up to 2G of data, 64bit has no limit.

     I will download "version 2.0.2, 32bit" here, ok, after downloading, I will put it on the "E drive" and change the folder name to "mongodb".

 

Two: start

     ①: Before starting, we need to specify a folder for mongodb, which is named "db" here to store the data of mongodb.

         

     ②: Microsoft logo + R, enter cmd, first find the path of "mongodb", then run the mongod start command, and use --dbpath to specify the data storage location as the "db" folder.

 

              

 

③: Finally, check whether the opening is successful. From the information in the figure, we know that mongodb uses port 27017, then we type " http://localhost:27017/ "       in the browser ,

             After opening, mongodb tells us that Add 1000 on 27017 can view the management information of mongodb in http mode.

           

               

 

You need to set the path every time you open it, otherwise an error will be reported

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326579295&siteId=291194637