Chapter 1. Installing and Starting the Server

In this chapter, we will cover the following recipes:

  • Installing single node MongoDB
  • Starting a single node instance using the command-line options
  • Installing single node MongoDB with options from the config file
  • Connecting to a single node in the Mongo shell with JavaScript
  • Connecting to a single node from a Java client
  • Connecting to a single node from a Python client
  • Starting multiple instances as part of a replica set
  • Connecting to the replica set in the shell to query and insert data
  • Connecting to the replica set to query and insert data from a Java client
  • Connecting to the replica set to query and insert data using a Python client
  • Starting a simple sharded environment of two shards
  • Connecting to a shard in the shell and performing operations

Introduction

In this chapter, we will look at starting up the MongoDB server. Though it is a cakewalk to start the server with default settings for development purposes, there are numerous options available to fine-tune the start up behavior. We will start the server as a single node and then introduce various configuration options. We will conclude this chapter by setting up a simple replica set and running a sharded cluster. So, let's get started with installing and setting up the MongoDB server in the easiest way possible for simple development purposes.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset