Thursday, December 31, 2015

How to install Mongo DB in Fedora?

Steps

  1. curl -o http://downloads.mongodb,org/linux/mongodb-linux-i686-2.6.3.tgz
  2. tar -zxvf mongodb-linux-i686-2.6.3.tgz
  3. mkdir -p mongodb
  4. cp -R -h mongodb-linux-i686-2.6.3/ mongodb  (to create the target folder)
Switch to the root user
mkdir -p /data/db
Create a mongodb.conf file and save it in /etc folder.
Create a folder named "mongodb" in /var/log

Then use below command

mongod --config /etc/mongodb.conf

After then
enter mongo in terminal to work on mongodb.