MongoDB: Standalone: Difference between revisions

From The Uniform Server Wiki
Jump to navigation Jump to search
(New page: {{Nav MongoDB}} '''''MongoDB''''' == Introduction == Uniform Server MongoDB Standalone extracts MongoDB server and associated files. Extracted files are portable meaning you can copy the m...)
(No difference)

Revision as of 19:33, 1 August 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 their.

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.

Top

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

Top

Run

Start Windows interface

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

  • I hate nag pop-ups however 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 hence click no not to 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 is 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:

Top

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

Top

Summary

Running MongoDB is as simple as the above.

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

Top