Mongo Shivesh
Mongo Shivesh
1. Download MongoDB
1|Pag
2. Install MongoDB
Windows:
- Run the MongoDB installer (.msi file) you downloaded.
- Follow the installation wizard. You can choose the "Complete" setup type
for all features.
- Optionally, install MongoDB Compass, a GUI for MongoDB, if it's included
in the installer options.
macOS:
- Open the downloaded .tgz file and extract it.
- Copy the extracted files to your preferred directory (commonly
`/usr/local/mongodb`).
Linux:
- Follow the specific installation commands for your Linux distribution as
per the MongoDB documentation. This usually involves updating your
package database, installing the MongoDB packages, and optionally ensuring
that MongoDB will start on boot.
2|Pag
3. Configure MongoDB
- MongoDB requires a data directory to store its databases. The default path is
`/data/db` on Linux and macOS. You might need to create this directory and set
the appropriate permissions.
- On Windows, the installer might set up the data directory for you, or you can
specify a custom path during installation.
3|Pag
- Add the MongoDB bin directory to your system's PATH environment
variable for easy execution of MongoDB's commands from any command
prompt or terminal window.
4. Start MongoDB
Windows:
- If you've installed MongoDB as a service, it should start automatically.
- Otherwise, you can start MongoDB manually by navigating to the MongoDB
bin directory and running `mongod.exe`.
macOS and Linux:
- Open a terminal window.
- Start MongoDB by running the `mongod` command, specifying the data
directory if it's not the default path, e.g., `mongod --dbpath /your/custom/path`.
4|Pag
6. (Optional) Install MongoDB Compass
- MongoDB Compass is the official GUI for MongoDB. If you didn't install it
during the MongoDB installation (or if it wasn't included), you can download it
separately from the MongoDB website and install it to easily manage your
MongoDB databases through a graphical interface.
This guide provides a general overview. For detailed instructions, especially for
specific operating systems or for troubleshooting, refer to the official
MongoDB documentation or the setup guide for your specific environment.
5|Pag
6|Pag