MongoDB: Standalone: Difference between revisions

From The Uniform Server Wiki
Jump to navigation Jump to search
(Punctuation and grammatical changes; some clarification.)
mNo edit summary
Line 48: Line 48:
Start server click '''Start MongoDB''' button.
Start server click '''Start MongoDB''' button.


'''''Note'':''' With the server running greyed out button is enabled.
'''''Note'':''' With the server running, greyed out button is enabled.


'''''Stop Server'''''
'''''Stop Server'''''
Line 75: Line 75:
|}
|}


'''''Note 1'':''' When challenged by your firewall always grant Internet access.
'''''Note 1'':''' When challenged by your firewall, always grant Internet access.


'''''Note 2'':''' This server runs as a standard program and not as a service.
'''''Note 2'':''' This server runs as a standard program and not as a service.
It is for development '''only'''! Do not use for a production server!
It is for development '''only'''! Do not use for a production server!
<pre>
<pre>
Line 86: Line 85:
  access databases TCP ports."
  access databases TCP ports."
</pre>
</pre>
For a production server, use either of these:
For a production server, use either of these instead:
* [[MongoDB: Production Standalone | Production Standalone]]
* [[MongoDB: Production Standalone | Production Standalone]]
* [[MongoDB: Production Plugin | Production Plugin]]
* [[MongoDB: Production Plugin | Production Plugin]]

Revision as of 23:42, 5 September 2010

 

UniServer 6-Carbo
MongoDB Uniform Server Series.

MongoDB

Introduction

Uniform Server MongoDB Standalone extracts MongoDB server and associated files. Extracted files are portable, meaning you can copy the main folder and all its content to a USB memory stick and run the server from there.

A Windows interface is provided, allowing you to start and stop MongoDB server. From this interface you can start the mongo-client and a cmd prompt. These allow you to administer mongo-databases.

Independent operation is achieved using a single binary (PHP 5.3.2 compiled with common extensions including new WinBinder with UTF-8 support) extracted from phpack v0.7.5 see Winbinder forum for details. The dll is located in phpack basic stubs folder.

Download and Install

Options 1

  1. Download file mongo_standalone_v1_0.exe from Sourceforge. For download details see MongoDB Introduction (Main Start page)
  2. Save to any folder (no spaces in path)
  3. To extract files, double click on file mongo_standalone_v1_0.exe, no need to change the path.
  4. Navigate to folder mongodb_1.
  5. Double click Run_MongoDB.exe opens control menu

Options 2

  1. Download file mongo_standalone_v1_0..zip from Sourceforge For download details see MongoDB Introduction (Main Start page)
  2. Save to any folder (no spaces in path)
  3. Extract files, navigate to folder mongo_standalone_v1_0
  4. Navigate to folder mongodb_1.
  5. Double click Run_MongoDB.exe opens control menu

Run

Start Windows interface

Double click on file Run_MongoDB.exe located in folder mongodb_1.

  • I hate nag pop-ups, but this one is very important.
  • Always close MongoDB before turning your PC off.
  • It needs to perform a clean up to maintain data integrity.

The nag pop-up can be infuriating, but you can click no to not display it again at next start up.

Note: If you want to restore the nag pop-up, delete the following file:

mongodb_1\control\no_nag.txt

Start Server

Start server click Start MongoDB button.

Note: With the server running, greyed out button is enabled.

Stop Server

Button toggles displaying Stop MongoDB

Open cmd Window

Opens a command window and changes to folder: mongodb_1\bin

Provides access to Mongo’s suite of command-line tools.

Button Start Mongo Client

Opens a command window and runs mongo-client. Button is enabled when server is running; otherwise it's disabled.

Button Help and Information

Opens main read me file in Notepad.

Note 1: When challenged by your firewall, always grant Internet access.

Note 2: This server runs as a standard program and not as a service. It is for development only! Do not use for a production server!

 "One valid way to run the Mongo database is in a trusted environment, with no
 security and authentication.  This is the default option and is recommended.
 Of course, in such a configuration, one must be sure only trusted machines can
 access databases TCP ports."

For a production server, use either of these instead:


Clean up

When you have finished playing, you probably will want to clean up and start afresh.

  1. Close MongoDB – Click "Stop MongoDB" button
  2. Navigate to folder: mongodb_1\data\mongodb
  3. Delete its contents. Removing all databases created effectively gives you a clean install.

Alternative control

If you prefer to use batch files, take a look in folder alt_control

Files:

Run_start_mongo.bat  - Run MongoDB server hidden
Run_stop_mongo.bat   - Cleanly stop MongoDB server
Run_client.bat       - Directly runs mongo-client
Run_cmd.bat          - Opens a command window changes to bin folder allowing
                       you to run MongoDB's command line tools

Summary

Running MongoDB is really simple.

Hey! If you don’t like the control interface, change it; MongoDB Tutorial 1 provides details.