NoSQL Learning one: MongoDB download and install

Source: Internet
Author: User
Tags mongodb download mongodb server

  MongoDB is a product between a relational database and a non-relational database, and is the most versatile and most like relational database in a non-relational database. The data structure he supports is very loose and is a JSON-like Bjson format, so you can store more complex data types. MONGO's biggest feature is that the query language he supports is very powerful, and its syntax is a bit like an object-oriented query language that almost implements most of the functionality of a relational database single-table query, and also supports indexing of data.

It is characterized by high performance, easy to deploy, easy to use, and easy to store data. The main features are:

    • For collection storage, easy to store data for object types.
    • Mode of freedom.
    • Supports dynamic queries.
    • Supports full indexes, including internal objects.
    • Support Queries.
    • Supports replication and recovery.
    • Use efficient binary data storage, including large objects such as video.
    • Automatically process fragmentation to support scalability at the cloud level
    • Support for C #, JAVA, C + +, PHP, RUBY, Python and many other languages.
    • File storage format is Bson (an extension of JSON)
    • Accessible over the network

The MongoDB server can run on Linux, Windows or OS X platforms, supports 32-bit and 64-bit applications, and the default port is 27017. It is recommended to run on a 64-bit platform because MongoDB supports a maximum file size of 2GB when running in 32-bit mode.

MongoDB stores the data in a file (the default path is:/data/db), which is managed using a memory-mapped file for increased efficiency.

The above is casually picked, in fact, non-traditional non-relational database, now classified into the document database classification. Let's start the learning path.

First, download

Official address: Https://www.mongodb.org/downloads.

Download the appropriate version for your system. I am here to download Mongodb-win32-x86_64-3.0.6-signed.msi (installation version).

Second, installation

The installation is simple, except that the installation path is selected, which is the next step.

Third, start MongoDB 1, preparation work:

Create the Data folder under the MongoDB installation directory, and then set up Db,log two folders, which have the following folders under MongoDB: Create a log file MongoDB.log under the log folder. (These folders are required for the MongoDB service installation to start, and the default installation is not created).

2. Program startup mode and delete 2.1 cmd mode

Run cmd in managed mode, enter the bin directory of the MongoDB installation, and then run the Mongod Open command while using--dbpath to specify the data storage location as the "DB" folder. Command: Mongod-dbpath "D:\Program Files (x86) \mongodb\server\3.0\data\db".

Open success, you may see MongoDB using 27017 port, you can enter "http://localhost:27017/" in the browser, open the page can see information: It looks like you is trying to access MongoDB over HTTP on the native driver port. The main idea is to try to access the MongoDB over the HTTP local drive port.

2.2 Windows Service mode

Run cmd in managed mode, enter the bin directory of the MongoDB installation, enter the command: Mongod--dbpath "D:\Program Files (x86) \mongodb\server\3.0\data\db"--logpath "D : \program Files (x86) \mongodb\server\3.0\data\log\mongodb.log "--install--servicename" MongoDB ".

Here MongoDB.log is the beginning of the log file,--servicename "MongoDB" service named MongoDB, run the command successfully such as:

In Service Manager, you may see a service that has a name of MongoDB. Right-click to start, or enter command to start.

NET Start MongoDB (open service)

NET Stop MongoDB (shutdown service)

After the service is successfully opened, you can see the version information and MONGODB instructions in controlling the input MONGO:

2.3 Deleting a service

Mongod--dbpath "D:\Program files (x86) \mongodb\server\3.0\data\db"--logpath "D:\Program files (x86) \mongodb\server\ 3.0\data\log\mongodb.log "--remove--servicename" MongoDB "

NoSQL Learning one: MongoDB download and install

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.