Mongodb series: first recognized by Mongodb and first recognized by mongodb Series

Source: Internet
Author: User
Tags install mongodb mongodb server

Mongodb series: first recognized by Mongodb and first recognized by mongodb Series

I. background:

We are honored to have taken part in the examination system maintenance at the beginning of the month. (For more information, see the activities we attended in those years: System Maintenance summary for the first half of the 15 years.) It is mainly responsible for server maintenance and meets Mongodb during maintenance.

What is Mongodb ??? If your shoes are a little dizzy, please try Me!

Mongodb advantages: because its storage structure is different from traditional databases, it is usually used to store large files, such as photos, videos, and audios. (See why Mongodb is suitable for Big Data Storage)

It is precisely because of these advantages that the examination system chooses to use it to store English listening materials, VB examination pictures, pictures of the Animal Science examination, and pictures of Middle School Students in the basic library.


Ii. installation and operation:

1) installation steps:

① First download the corresponding installation package from the official Mongodb website!

② Configuration data file:

Create the mongo. config file in D: \ mongodb \, as shown below (and create a data and log folder in the d: \ mongodb directory)

# Data storage location dbpath = D: \ mongodb \ data # All output locations logpath = D: \ mongodb \ log \ mongo. log # log read/write operations diaglog = 3

③ Run Mongodb Server:

In the command control line, switch to the d: \ mongodb \ bindirectory and use the command mongod.exe -- config d: \ mongdb \ mongo. config to start the MongoDb Server.

D: \ mongodb \ bin> mongod.exe -- config d: \ mongodb \ mongo. config

All output going to: D: \ mongodb \ log \ mongo. log

④ Connect to Mongodb:

You can use cmd.exe to connect to the MongoDB Server.

⑤ Set Mongodb as a Windows Service:

In the command line control window, add the -- install option to install MongoDB as a Windows service.

D: \ mongodb \ bin> mongod.exe -- config d: \ mongodb \ mongo. config

The command to start MongoDB is: net start MongoDB

The command to stop MongODB is: net stop MongoDB

The command for deleting MongoDB is mongod -- remove.


2) differences between copy and installation:

After Mongodb is installed, you do not need to use a batch file (for example, c: \ MongoDB \ mongod.exe-dbpath c: \ MongoDB \ data pause) always open!

If it is copied from another machine, the batch processing file must be running all the time!

For the reason, see the following: Mongodb service start no study

 

Iii. Mongodb service launch No research:

Finally, the experiment found that if the Mongodb is installed, it will be in the service (location: Right-click computer management) as shown in:


In this case, the Mongodb service can close the batch processing page after using the batch processing file.

If Mongodb is copied only from other machines, there is no MongoDB service item in the service. The batch processing page cannot be closed after a batch file is used up.

This is the legendary Mongodb batch processing page!

4. Check whether Mongodb is running properly:

1) Use http: // 127.0.0.1 (localhost): 27017/to display a line of English letters. (You can create shortcuts frequently )! As shown in:


2) Go to the installation directory in DOS and run the mongo command to check whether the database name or size is correct after show dbs is used. As shown in:


 

5. visualization tools

There are many tools to operate Mongodb. MongoVUE is a good tool. It can operate Mongodb visually and see the data stored in it (audio, images, videos, etc )! In addition, you can store data directly (without using a program) in the database. The advantage of this is that you can reduce the number of programs written when storing data in the database, but it is strongly not recommended because this is a direct operation on the database, too dangerous! In addition, errors may easily occur if they are not implemented according to the corresponding specifications. If they are implemented through the corresponding program, these errors can be avoided.

It is easy to manage and supports remote access (generally no password by default )!


Vi. Friendly reminder:

In a 32-bit Mongodb system, the maximum database size is 2 GB. Apart from the required database, the maximum size of user data is about MB. 64-bit is not restricted. Therefore, on the 32-bit [standby machine] of 251, because of the large listening capacity in English, you need to delete the day after the test and then transfer it to tomorrow's hearing. This greatly increases the labor volume.

 

VII. Summary:

Every time you participate in the activity, you can get a lot from it, actively participate in it, experiment and communicate with others when you encounter problems, which has a lot of fun. Let's take a look at Mongodb. This time, it will take two days for you to take over the server. Instead, you need to use Mongodb, And you will continue to drum up all night long, first, it is because of pressure (the test is not good enough, it will be less secure); second, you do like to be willing to come into contact with these new things. At the same time, I would like to thank the old server 251 for its low configuration. Mongodb has the most problems with it, and I have also grown the most when solving the problem.


Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.