Install and start mongodb in linux

Source: Internet
Author: User
Tags mongodb server mongodump mongorestore
One go to the directory decompress the downloaded package lamp @ QA-clgserver $ tar-zxvfmongodb.tgz 2 after installation view: [lamp@QA-clgmongodb-linux-x86_64-2.4.6] $ cdbin [lamp @ QA-clgbin] $ lsbsondump?dump=importmongorestoremongostat##export#oplog

1. decompress the downloaded package to the directory lamp @ QA-clg server $ tar-zxvf mongodb. tgz 2 after installation view: [lamp @ QA-clg mongodb-linux-x86_64-2.4.6] $ cd bin [lamp @ QA-clg bin] $ lsbsondump mongodump Export Import mongorestore into statmongo export oplog



1. decompress the downloaded package to the directory
Lamp @ QA-clg server $ tar-zxvf mongodb. tgz


After installation, check:
[lamp@QA-clg mongodb-linux-x86_64-2.4.6]$ cd bin[lamp@QA-clg bin]$ lsbsondump mongodump mongoimport mongorestore mongostatmongo mongoexport mongooplog mongos mongotopmongod mongofiles mongoperf mongosniff

Mongod in bin is the MongoDB server process, mongo is its client, and other commands are used for other purposes of MongoDB, such as MongoDB File Export.


3. startup process:


Create a directory for MongoDB to store data files and log files.

[lamp@QA-clg mongodb-linux-x86_64-2.4.6]$ cd data[lamp@QA-clg data]$ lsdb logs[lamp@QA-clg data]$


Use mongod in the bin directory of the MongoDB installation directory to start MongoDB ,. /mongod -- dbpath = (self-installed path)/data/mongodb_data/-- logpath = (self-installed path)/data/mongodb_log/mongodb. log -- logappend &


4. Check the log and check that the startup is successful.

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.