Monday, August 5, 2013

Install MongoDB on Red Hat Enterprise, CentOS, or Fedora Linux

Install MongoDB on Red Hat Enterprise, CentOS, or Fedora Linux

64-bit system (recommended)

#vim /etc/yum.repos.d/10gen.repo
[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
enabled=1

32 bit system (recommended)

#vim /etc/yum.repos.d/10gen.repo
[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/i686
gpgcheck=0
enabled=1

#yum install mongo-10gen mongo-10gen-server
#service mongod start
#chkconfig mongod on
 
Login command
#mongo

Database Backup Command
# mongodump -d databasename
Datebase restore command
## cd <dump_directory>
# mongorestore -d <db_name> <dump_backup_directory>
Delete Database
# mongo <dbname> --eval "db.dropDatabase()"

1 comments:

hameedudhaaam said...

Thanks for sharing this best stuff with us! Keep sharing! I am new in the blog writing.All types blogs and posts are not helpful for the readers.Here the author is giving good thoughts and suggestions to each and every readers through this article.Quality of the content is help with essay writing uk the main element of the blog and this is the way of writing and presenting.