We have moved to www.dataGenX.net, Keep Learning with us.

Wednesday, June 03, 2015

MongoDB Configuration in Linux


DOWNLOAD the stable version of MongoDB. It will a tar file.

1. Create a folder named 'learn' ( or whatever you want to give )
     $ mkdir -p /learn/mongodb  /app/dbMongo
      # /learn/mongodb  = Holds the MongoDB source
      # /app/dbMongo = Holds the MongoDB database




2. Extract the Mongo DB zip file in /learn folder
  $ tar -xvf MongoDB.tar  /learn/mongodb






3.  change the permission of folder to user who run the db here-  In my case User - atul and Group - atul
  $ chown -R atul:atul  /learn/mongodb  /app/dbMongo









4. Create a configuration file for MongoDB and customize as per your installation (if different)  and place the file in /app/ directory.  For my installation –


5. Add these line in .bashrc file
# User specific aliases and functions

#Home location for MongoDB
MONGO_HOME='/learn/mongodb'

#Mongo DB start command alias
alias SdbMongo='$MONGO_HOME/bin/mongod --config /app/dbMongo.conf'

#Add MongoDB in PATH
export PATH=$PATH:$MONGO_HOME/bin


6. for Starting MongoDB, simply execute the alias which we have created.
$ SdbMongo
# or execute the below command
$MONGO_HOME/bin/mongod --config /app/dbMongo.conf


mongod.pid file holds the process id for mongoDB
mongod.log file hold the log of mongoDB






Like the Facebook Page & join Group
https://www.facebook.com/DataStage4you
https://www.facebook.com/groups/DataStage4you

https://twitter.com/datastage4you
https://groups.google.com/d/forum/datastage4you
For WHATSAPP group , drop a msg to 91-88-00-906098






3 comments :

  1. Do you use Mongo together with Datastage?

    ReplyDelete
  2. We can use MongoDB with Datastage with the help of MongoDB connector stage and JSON parser.

    ReplyDelete
    Replies
    1. I'm curious, what kind of data in a business would be stored in MongoDB?

      Delete