MONGODB installation configuration, startup off

Source: Internet
Author: User
Tags mongodb win32 dochub

MongoDB installation configuration, startup off

1. Download the MongoDB installation files, I install the Windows 32-bit, download the address as follows:

Http://www.mongodb.org/dr//fastdl.mongodb.org/win32/mongodb-win32-i386-2.6.4.zip/download

2. Create a new MongoDB folder on the e-disk (casually)

E:\mongodb

3. Unzip the downloaded file installation file and move the extracted files to the E-drive MongoDB

4. Establish the MongoDB data storage directory E:\mongodb\data

5. Start MongoDB (simple boot not configured service)

E:\mongodb\bin\mongod.exe--dbpath E:\mongodb\data

E:\mongodb\bin>mongod.exe--dbpath E:\mongodb\data

2014-09-13t22:18:50.640+0800

2014-09-13t22:18:50.640+0800 warning:32-bit servers don ' t has journaling enabled by default. Please use the--journal if you want durability.

2014-09-13t22:18:50.640+0800

2014-09-13t22:18:50.765+0800 [Initandlisten] MongoDB starting:pid=9204 port=27

017 Dbpath=e:\mongodb\data 32-bit host=20120621-1418

2014-09-13t22:18:50.765+0800 [Initandlisten]

2014-09-13t22:18:50.765+0800 [Initandlisten] * * Note:this is a A-bit MongoDB binary.

2014-09-13t22:18:50.765+0800 [Initandlisten] * * [Builds bit] is limitedto less than 2GB of data (or less with--jo urnal).

2014-09-13t22:18:50.765+0800 [Initandlisten] * * Note that the journaling defaults to off for the and is currently off .

2014-09-13t22:18:50.765+0800 [Initandlisten] * * See Http://dochub.mongodb.org/core/32bit

2014-09-13t22:18:50.765+0800 [Initandlisten]

2014-09-13t22:18:50.765+0800 [Initandlisten] * * Note:your operating system version does not support the method that Mongo Db

2014-09-13t22:18:50.765+0800 [Initandlisten] * * uses to detect impending page faults.

2014-09-13t22:18:50.765+0800 [Initandlisten] * * This could result in slowerperformance for certain use cases

2014-09-13t22:18:50.765+0800 [Initandlisten]

2014-09-13t22:18:50.765+0800 [Initandlisten] targetminos:windows XP SP3

2014-09-13t22:18:50.765+0800 [Initandlisten] DB version v2.6.4

2014-09-13t22:18:50.765+0800 [Initandlisten] git version:3a830be0eb92d772aa855ebb711ac91d658ee910

2014-09-13t22:18:50.765+0800 [Initandlisten] Build info:windows sys.getwindowsversion (major=6, Minor=1, build=7601, platform=2, service_pack= ' Service Pack 1 ' boost_lib_version=1_49

2014-09-13t22:18:50.765+0800 [Initandlisten] Allocator:system

2014-09-13t22:18:50.765+0800 [Initandlisten] options: {storage: {dbPath: ' E:\mongodb\data '}}

Enter http://localhost:27017/in the browser, the surface mongdb is started.

It looks like you is trying to access MongoDB over HTTP on the native driver port.

6. Connect to MongoDB after start up

E:\mongodb\bin\mongo.ext

E:\mongodb\bin>mongo

MongoDB Shell version:2.6.4

Connecting To:test

Welcome to the MongoDB shell.

For interactive help, type ' help '.

For more comprehensive documentation, see

http://docs.mongodb.org/

Questions? Try the Support group

Http://groups.google.com/group/mongodb-user

Server has startup warnings:

2014-09-13t22:18:50.765+0800 [Initandlisten]

2014-09-13t22:18:50.765+0800 [Initandlisten] * * Note:this is a A-bit MongoDB binary.

2014-09-13t22:18:50.765+0800 [Initandlisten] * * [Builds bit] is limitedto less than 2GB of data (or less with--jo urnal).

2014-09-13t22:18:50.765+0800 [Initandlisten] * * Note that the journaling defaults to off for the and is currently off .

2014-09-13t22:18:50.765+0800 [Initandlisten] * * See Http://dochub.mongodb.org/core/32bit

2014-09-13t22:18:50.765+0800 [Initandlisten]

2014-09-13t22:18:50.765+0800 [Initandlisten] * * Note:your operating system version does not support the method that Mongo Db

2014-09-13t22:18:50.765+0800 [Initandlisten] * * uses to detect impending page faults.

2014-09-13t22:18:50.765+0800 [Initandlisten] * * This could result in slowerperformance for certain use cases

2014-09-13t22:18:50.765+0800 [Initandlisten]

>

MongoDB off:

Front desk operation:

If the--fork is not used, the front exit terminal can be turned off directly. In this way, MongoDB will do its own cleanup and exit, write the data that is not well written, and eventually close the data file. It is important to note that this process continues until all operations are completed.

Running in the background:

If you use--fork to run the MONGDB service in the background, you should close it by sending a shutdownserver () message to the server.

1. General Command:

$./mongod

> Use admin

> Db.shutdownserver ()

> Db.shutdownserver ()

2014-09-13t22:25:07.843+0800 Dbclientcursor::init Call () failed

Server should is down ...

2014-09-13t22:25:07.890+0800 trying reconnect to 127.0.0.1:27017 (127.0.0.1) failed

2014-09-13t22:25:08.890+0800 warning:failed to connect to 127.0.0.1:27017, Reas

on:errno:10061 cannot connect because the target machine is actively rejected.

2014-09-13t22:25:08.890+0800 Reconnect 127.0.0.1:27017 (127.0.0.1) failed failed

Couldn ' t connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed

>

The console displays as follows:

2014-09-13t22:25:07.625+0800 [conn1] terminating, Shutdown command received

2014-09-13t22:25:07.625+0800 [CONN1] Dbexit:shutdown called

2014-09-13t22:25:07.625+0800 [CONN1] shutdown:going to close listening sockets.

..

2014-09-13t22:25:07.625+0800 [CONN1] closing listening socket:1632

2014-09-13t22:25:07.625+0800 [CONN1] shutdown:going to flush diaglog ...

2014-09-13t22:25:07.625+0800 [CONN1] shutdown:going to close sockets ...

2014-09-13t22:25:07.625+0800 [CONN1] shutdown:waiting for FS preallocator ...

2014-09-13t22:25:07.625+0800 [conn1] shutdown:closing All Files ...

2014-09-13t22:25:07.625+0800 [Conn1] Closeallfiles () finished

2014-09-13t22:25:07.625+0800 [CONN1] shutdown:removing FS lock ...

2014-09-13t22:25:07.625+0800 [CONN1] dbexit:really exiting now

E:\mongodb\bin>

Close success

MongoDB Startup Help

E:\mongodb\bin>mongod--help

Options:

General Options:

-H [--help] Show this usage information

--version Show version Information

-F [--config] arg configuration file specifying additional options

-v [--verbose] [=arg (=V)] is more verbose (include multiple times for more

verbosity e.g.-VVVVV)

--quiet quieter output

--port arg specify port number-27017 by default

--BIND_IP Arg comma separated list of IP addresses to listen on

-All local IPs by default

--maxconns arg max number of simultaneous connections-1000000

By default

--logpath arg log file to send write to instead of Stdout-has

To bes a file, not directory

--logappend Append to LogPath instead of over-writing

--timestampformat ARG desired format for timestamps in log messages.

One of CTime, ISO8601-UTC or iso8601-local

--pidfilepath arg full path to Pidfile (if not set, no pidfile is

Created

--keyfile ARG private key for cluster authentication

--setparameter arg Set a configurable parameter

--httpinterface Enable HTTP interface

--clusterauthmode arg authentication mode used for cluster

Authentication. Alternatives is

(keyfile|sendkeyfile|sendx509|x509)

--auth Run with security

--noauth Run without security

--ipv6 Enable IPV6 support (disabled by default)

--jsonp allow JSONP access via HTTP (have security

implications)

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.