MongoDB Documentation, Release 3.0.4 Step 1: Create the data directory. Before you start MongoDB for the first time, create the directory to which the mongod process will write data. By default, the mongod process uses the /data/db directory. If you create a directory other than this one, you must specify that directory in the dbpath option when starting the mongod process later in this procedure. The following example command creates the default /data/db directory: mkdir -p /data/db Step 2: Set permissions for the data directory. Before running mongod for the first time, ensure that the user account running mongod has read and write permissions for the directory. Step 3: Run MongoDB. To run MongoDB, run the mongod process at the system prompt. If necessary, specify the path of the mongod or the data directory. See the following examples. Run without specifying paths If your system PATH variable includes the location of the mongod binary and if you use the default data directory (i.e., /data/db ), simply enter mongod at the system prompt: mongod Specify the path of the mongod If your PATH does not include the location of the mongod binary, enter the full path to the mongod binary at the system prompt: <path to binary>/mongod Specify the path of the data directory If you do not use the default data directory (i.e., /data/db ), specify the path to the data directory using the --dbpath option: mongod --dbpath <path to data directory> Step 4: Begin using MongoDB. To help you start using MongoDB, MongoDB provides Getting Started Guides in various driver editions. See getting-started for the available editions. Before deploying MongoDB in a production environment, consider the Production Notes (page 197) document. Later, to stop MongoDB, press Control+C in the terminal where the mongod instance is running. Use this tutorial to install MongoDB on OS X systems. Starting in version 3.0, MongoDB only supports OS X versions 10.7 (Lion) on Intel x86-64 and later. MongoDB is available through the popular OS X package manager Homebrew 5 or through the MongoDB Download site$^{6}$. $^{5}$http://brew.sh/ $^{6}$http://www.mongodb.org/downloads Chapter 2. Install MongoDB 24 2.3.2 Install MongoDB on OS X Overview Platform Support