Install MongoDB on Linux
MongoDB installation packages are available for both 32 bit and 64 bit Linux. You can download it, and install.
Here is the link to download the installation packages of MongoDB : http://www.mongodb.org/downloads
After downloading the zip file, unzip it to the folder where you want to install.
Create a data directory
MongoDB stores data in db folder within data folder. But, since this data folder is not created automatically, you have to create it manually. Remember that data directory should be created in the root (/).
Run the MongoDB server from command prompt
To run MongoDB server from command prompt, you have to execute mongod.exe file from bin folder of mongodb folder.
Getting started with administrative shell
db command will show you the list of documents(databases).
We will insert a simple record and retrieve the data now.
The first command inserts 8 to the z field, to the w3r collection(table).
MongoDB web interface
At a port number 1000 more than the port on which the MongoDB server is running, you can access a web interface of MongoDB.
If MongoDB is running at the default port 27017, the you can access the web interface at 28017.
- Weekly Trends
- Python Interview Questions and Answers: Comprehensive Guide
- Scala Exercises, Practice, Solution
- Kotlin Exercises practice with solution
- MongoDB Exercises, Practice, Solution
- SQL Exercises, Practice, Solution - JOINS
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join
We are closing our Disqus commenting system for some maintenanace issues. You may write to us at reach[at]yahoo[dot]com or visit us at Facebook