28 July, 2016

on Leave a Comment

Easy way: MongoDB installation on Ubuntu



Open terminal and execute these steps in terminal
Steps:
1. sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
2. echo 'deb Index of /repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
3. sudo apt-get update
4. sudo apt-get install -y mongodb-org
Its installed! Now, to start it
5. sudo service mongod start
To verify that it has started, open file /var/log/mongodb/mongod.log and check for line "initandlisten] waiting for connections on port <port>" (port is 27017 by default). 

Other things:
To stop it : 
sudo service mongod stop
To restart it : 
sudo service mongod restart
Location of log files: /var/log/mongodb (by default)
Location of data files : /var/lib/mongodb (by default)

I have taken stuffs from below mentioned link to write it in a concise way to install fast. For more details (if, needed), go to below link:
Reference : Install MongoDB on Ubuntu

MongoDB works best in 64bit systems , but even if you don't have , no worries. It will still work.

0 comments:

Post a Comment

Ads

Landing Page eBook WP Shopping Cart

Follow me