To help you start using MongoDB, MongoDB provides Getting Started Guides in various driver editions. 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 If your PATH does not include the location of the mongod binary, enter the full path to the mongodbinary at the system prompt: /mongod 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 If necessary, specify the path of the mongod or the data directory. To run MongoDB, run the mongod process at the system prompt. The following example command creates the default /data/db directory: mkdir -p /data/dbīefore running mongod for the first time, ensure that the user account running mongod has read and write permissions for the 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. By default, the mongod process uses the /data/db directory. Replace with the path to the extracted MongoDB archive.īefore you start MongoDB for the first time, create the directory to which the mongod process will write data. To ensure that the binaries are in your PATH, you can modify your PATH.įor example, you can add the following line to your shell’s rc file (e.g. The MongoDB binaries are in the bin/ directory of the archive. mkdir -p mongodbĬp -R -n mongodb-osx-x86_64-3.2.19/ mongodbĮnsure the location of the binaries is in the PATH variable. Only install MongoDB Community Edition using this procedure if you cannot use homebrew.ĭownload the binary files for the desired release of MongoDB.įor example, to download the latest release through the shell, issue the following: curl -O Įxtract the files from the downloaded archive.įor example, from a system shell, you can extract through the tar command: tar -zxvf mongodb-osx-x86_64-3.2.19.tgzĬopy the extracted archive to the target directory.Ĭopy the extracted folder to the location from which MongoDB will run. Install MongoDB Community Edition Manually
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |