Centos installation MONGO DB

Source: Internet
Author: User

NoSQL's use of human data in a very short time is high, not only as a new storage idea, but also because it is more efficient at manipulating big data than the relational database

Tools/Materials
    • A CentOS computer connected to the Internet
Download the installation file
    1. Download the installation file

      wget https://fastdl.mongodb.org/linux/mongodb-linux-i686-2.6.7.tgz?_ga=1.68265944.858401362.1421216907

    2. View downloaded compressed files

      END
Unzip the file
    1. Unzip the file

      TAR-ZXVF mongodb-linux-i686-2.6.7.tgz

    2. Renaming

      MV mongodb-linux-i686-2.6.7 MongoDB

      END
Install and configure
    1. Create a new directory log to store logs

      Create a new directory db to hold data information

    2. Go to Bin directory to view files

    3. Create a new configuration file and write configuration information

      VI mongodb.conf

      The configuration information is as follows:

      DBPath =/data/test/db #数据文件存放目录

      LogPath =/data/test/logs/mongodb.log #日志文件存放目录

      Port = 27017 #端口

      Fork = True #以守护程序的方式启用, which runs in the background

      Nohttpinterface = True

    4. Create a Directory

      /data/test/db

      Create a log file directory

      /data/test/logs/

      END
Start
    1. 1

      Starting in the Bin directory

      ./mongod--config mongodb.conf

      END
Precautions
    • The path in the bin/mongodb.conf must correspond to the actual path
    • Configuration file, DBPath is a directory path, LogPath is a path and log file

Centos installation MONGO DB

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.