Installing MongoDB on CentOS 6

by February 4, 2015 0 comments

MongoDB is an open source, document-oriented database built to store large amounts of documents, typically required for Big Data applications. Let’s see how to install it

MongoDB is a NoSQL database intended for model other than the tabular format used in relational databases such as MySQL, PostgreSQL, and Microsoft SQL. MongoDB features include: full index support, replication, high availability, and auto-sharding.

Step 1: Add the MongoDB Repository to your CentOS machine by using the following command: storing large amounts of data in document-oriented storage with dynamic schemas. NoSQL refers to a database with a data

step cetn 1

Step 2:

Option A: If you are running a 64-bit system, add the following information to the repository file you’ve created in step 1 , using i to insert or edit . Then exit and save the file with the command :wq! and press Enter.

step cetn 2

Option B: If you are running a 32-bit system, add the following information to the file you’ve created, using i to insert. Then exit and save the file with the command :wq! and press Enter.

step cetn 4

Step 3: Install MongoDB: At this point, installing MongoDB is as simple as running the following command:

step cetn 5

Step 4: If the installation goes well, it will prompt you with a “Is this ok [y/n]” message. Enter ‘y’ and hit ‘Enter’ if the installation was successful as follows:

step new

Step 5: Run MongoDB by using the following  command:

new 3

You would see an output very similar to the following  image:

new 2

Enter the MongoDB Command Line


 You would see an output very similar to the following image:

step cetn 9

By default, running this command will look for a

MongoDB server listening on port 27017 on the

localhost interface. If you’d like to connect to a MongoDB

server running on a different port, then use the –port

option. For example, if you want to connect to a local

MongoDB server listening on port 22222, then issue the

following command:

mongo —port 22222

port 22222

Shutdown MongoDB

service mongod stop

service stop

No Comments so far

Jump into a conversation

No Comments Yet!

You can be the one to start a conversation.