MONGODB Installation and Startup

Source: Internet
Author: User

Tutorial: http://www.mongodb.org.cn/tutorial/59.html

Download

>wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.11.tgz

Extract

>TAR-ZXVF mongodb-linux-x86_64-2.4.11.tgz

Put/usr/local/mongodb folder

Local>mkdir Mongdb

>cp/root/mongodb/*/usr/local/mongodb

Create a database directory

mongod.conf Configuration file Modification

port=10086

Logpath=/data/conf/mongodb.log logappend=falsedbpath=/data/db

Fork=true

Save

Startup and Shutdown modes

1:

Start the service

Bin>./mongod-f/data/conf/mongo.conf

Client connections

Bin>./mongo 127.0.0.1:10086

Shut down

Bin>use Admin

Bin>db.shutdownserver ();

Bin>ctrl+c

2:

Daemon Start

Bin>./mongod-f/data/conf/mongo.conf--smallfiles

Close Daemon

Bin>./mongod--shutdown--dbpath=/data/db

MONGODB Installation and Startup

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.