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