MongoDB Study Notes-download and install

Source: Internet
Author: User

MongoDB is a high-performance, open-source, and non-pattern document-based database. It is a popular nosql database. It can be used in many scenarios to replace traditional relational databases or key/value storage methods. Mongo is developed using C ++. Take the window platform as an example. Http://www.mongodb.org/downloads

Installation:

  1. Step 1: Download the installation package: if it is a Windows system, check whether it is a 64-bit or 32-bit version. Select the correct version.
  2. Step 2: Create the directory "D: \ mongodb.pdf", decompress the downloaded installation package, find the directory "all-part. EXE", and copy it to the directory you just created.
  3. Step 3: create a "data" folder under the "D: \ MongoDB" Directory, which will be used as the root folder for data storage.

Configure the Mongo Server:

Data warehouse server d.exeand management tool cmd.exe

Open the CMD window and enter the command as follows:

> D:

> Cd D: \ MongoDB

> Mongod -- dbpath D: \ MongoDB \ data

The following figure is displayed after the configuration is successful:

Enter http: // localhost: 27017/in the browser and you will see the following prompt:

You are trying to access MongoDB on the native driver port. For HTTP diagnostic access, add 1000 to the port number

In this way, the MongoDB Database Service has been successfully started.

Use cmd.exe to test simple JavaScript statements:

D: \ mondb> Mongo

> 3 + 3

6

> DB

> Test

> db.foo.insert( { a : 1 } )> db.foo.find(){ _id : ..., a : 1 }> show dbs...> show collections...> help

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.