Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add mongodb repo:
- nano /etc/yum.repos.d/mongodb.repo
- --------------------------------------
- for 32bit
- --------------------------------------
- [mongodb]
- name=MongoDB Repository
- baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/i686/
- gpgcheck=0
- enabled=1
- --------------------------------------
- --------------------------------------
- for 64bit
- --------------------------------------
- [mongodb]
- name=MongoDB Repository
- baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
- gpgcheck=0
- enabled=1
- --------------------------------------
- install mongodb from repo:
- yum install mongodb-org
- start mongodb on boot:
- chkconfig mongod on
- start mongodb:
- service mongod start
- display version:
- mongo --version
- run mongodb prompt:
- mongo
- (test sample output)
- --------------------------------------
- > db.test.save( { a: 1 } )
- > db.test.find()
- { "_id" : ObjectId("52b0dc8285f8a8071cbb5daf"), "a" : 1 }
- --------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement