Skip to content

Latest commit

 

History

History
 
 

mongo-java-master-slave-example

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
About
=======================================

A simple Mongo master/slave setup example using Mongo/Java/Ant.

See: http:https://www.mongodb.org/display/DOCS/Master+Slave

Prerequisites
=======================================

You must have Ant installed and in your $PATH.

You must have Mongo installed and the bin files in your $PATH.

Running
=======================================

Open two terminal windows and run one command in each:

ant master
ant slave

This runs two instances of Mongo on your machine on ports 27017, 27018.

In another terminal run:

ant run

This tests to make sure your configuration is setup properly.

Note: If you run "ant clean" this deletes the temp database files stored in build/*.

License
=======================================

Copyright 2011, Deft Labs.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at:

http:https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.