Starting a single node instance using command-line options
In this recipe, we will see how to start a standalone single node server with some command-line options. We will see an example where we want to do the following:
- Start the server listening to port
- Logs should be written to
- The database directory is
As the server has been started for development purposes, we don't want to preallocate full-size database files. (We will soon see what this means.)
If you have already seen and executed the Installing single node MongoDB recipe, you need not do anything different. If all these prerequisites are met, we are good for this recipe.
How to do it…
/data/mongo/dbdirectory for the database and
Get MongoDB Cookbook - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.