Installation of MongoDB (i)

Source: Internet
Author: User
Tags mongodb download mongodb version

0, Installation Environment Description:

Linux system: centos6.5

MongoDB version: Mongodb-linux-x86_64-rhel62-3.2.7.tgz

1. Download

MongoDB Download: https://www.mongodb.com/download-center#community, note select version

2. Decompression

TAR-ZXVF mongodb-linux-x86_64-rhel62-3.2.7.tgz

3. Specify the installation directory

MV Mongodb-linux-x86_64-rhel62-3.2.7/usr/local/mongodb

4. Create folders in the MongoDB folder data and logs

Cd/usr/local/mongodb

mkdir data

mkdir logs

5, create the configuration file mongodb.conf under Mongodb/bin, the file content is:

dbpath=/usr/local/mongodb/data  #数据文件存放记录logpath=/usr/local/mongodb/logs/mongodb.log     # Log file holds record port=27017Fork=true       #以守护进程的方式运行nohttpinterface=true 

6. Start the service

/usr/local/mongodb/bin/mongod--config/usr/local/mongodb/bin/mongodb.conf

7. Connection test

CD bin

./mongo

Db.help () lists the list of commands for MONGODB clients

8. View Logs

CD logs

Tail-f Mongodb.log

  

  

  

Installation of MongoDB (i)

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.