In this chapter, we will cover the following recipes:
Single node installation of MongoDB
Starting a single node instance using command-line options
Single node installation of MongoDB with options from the config file
Connecting to a single node from the Mongo shell with a preloaded JavaScript
Connecting to a single node from a Java client
Starting multiple instances as part of a replica set
Connecting to the replica set from the shell to query and insert data
Connecting to the replica set to query and insert data from a Java client
Starting a simple sharded environment of two shards
Connecting to a shard from the Mongo shell and performing operations