Download and installation of MongoDB under CentOS

Source: Internet
Author: User

1. Download MongoDB (64-bit)
Http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.9.tgztar ZXVF MONGODB-LINUX-X86_64-2.4.9.TGZCD mongodb-linux-x86_64-2.4.9
2, do not compile, itself is compiled binary executable file.
Bsondump (export Bson structure) MONGO (client, equivalent to Mysql.exe) Mongod (server-side, Equivalent to Mysqld.exe) mongodump (overall database export, binary, equivalent to mysqldump) mongoexport (export easy-to-identify JSON document live CSV document) Mongofilesmongoimportmongooplogmongoresto Re (database overall import) MONGOs (router, shard) mongostatmongotop
Rm-f/USR/LOCAL/MONGODB/MV mongodb-linux-x86_64-2.4.9/usr/local/mongodbcd/usr/local/mongodb/mkdir-p/home/ Mymongdb
3. Start Mongod Service
./bin/mongod--dbpath/path/to/database--logpath/path/to/log--fork--port 27017

Parameter explanation:

--dbpath Data Storage Directory

--logpath Log Store Directory

--port Run port (default 27017)

--fork Background Process Run

./bin/mongod--dbpath/home/mymongdb/--logpath/home/mymongolog/mymongo.log--fork--port

If:

About-to-fork child process, waiting until server was ready for connections.forked process:2611all output going to:/home/ Mymongolog/mymongo.logchild process started successfully, parent exiting

Description process started

PS aux|grep MONGO view process./bin/mongo//Link MONGO

MongoDB takes up a lot of disk space and takes up about 3-4g just after it starts up.

If you practice with a virtual machine, there may not be enough space to start.

Can be started with the--smallfiles option,

Will occupy a smaller space of about 400M.

Download and installation of MongoDB under CentOS

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.