Linux/centos MongoDB Installation

Source: Internet
Author: User
Tags mkdir
Upload mongodb-linux-x86_64-2.4.9.tgz to App server directory:/USR/LOCAL/SRC (use the software package plus the bottom of the list for free)
Unzip MongoDB
#cd/USR/LOCAL/SRC
#tar-ZXVF mongodb-linux-x86_64-2.4.9.tgz
Mobile MongoDB Directory
#mv Mongodb-linux-x86_64-2.4.9/usr/local/mongodb
Go to the MongoDB directory
#cd/usr/local/mongodb
Create the Data directory, which is used to save the information.
#mkdir-P data/
Create a logs directory for saving logs.
#mkdir logs
Start MongoDB in the next stage mode
#/usr/local/mongodb/bin/mongod--dbpath=/usr/local/mongodb/data Logpath=/usr/local/mongodb/logs/mongodb.log-- Fork

Set boot up MongoDB

#echo "/usr/local/mongodb/bin/mongod--dbpath=/usr/local/mongodb/data--logpath=/usr/local/mongodb/logs/ Mongodb.log--fork ">>/etc/rc.local
If you are interested in this, please scan the QR code below for free for more details

Linux/centos MongoDB Installation

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.