Install and start mongodb in linux.

Source: Internet
Author: User
Tags mongodb server

Install and start mongodb in linux.


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


After installation, check:
[Lamp @ QA-clg Co., mongodb-linux-x86_64-2.4.6] $ cd bin
[Lamp @ QA-clg bin] $ ls
Bsondump mongodump mongoimport mongorestore mongostat
Mongo kernel export kernel oplog mongos kernel top
Mongod program files mongoperf implements sniff
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] $ ls
Db 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.

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.