[MongoDB] Installation

Source: Internet
Author: User
Tags mongodb download

    1. Go to MongoDB Download Center:http://www.mongodb.org/downloads
      We recommend using these binary distributions (binary version is officially recommended!)
    2. According to your actual system environment, download the required files, mine is the Linux 64-bit.
      wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.8.tgz
      Then unzip:
      tar zxvf mongodb-linux-x86_64-2.2.3.tgz
      Move directory to/usr/local/mongodb
      mv mongodb-linux-x86_64-2.2.3 /usr/local/mongodb
      Go to the MongoDB directory
      cd /usr/local/mongodb
      New Custom Data Catalog
      mkdir -p ./data/db/
      New log Directory
      mkdir logs
      Next Run mode start MongoDB
      /usr/local/mongodb/bin/mongod --dbpath=/usr/local/mongodb/data/db --logpath=/usr/local/mongodb/logs/mongodb.log --fork
      Show
      process: 18261all output going to: /usr/local/mongodb/logs/mongodb.loglog file [/usr/local/mongodb/logs/mongodb.log] exists; copied to temporary file [/usr/local/mongodb/logs/mongodb.log.2013-03-01T04-04-28]child process started successfully, parent exiting
      To set up boot from:
      echo "/usr/local/mongodb/bin/mongod --dbpath=/usr/local/mongodb/data/db --logpath=/usr/local/mongodb/logs/mongodb.log --fork" >> /etc/rc.local
      View MongoDB Logs
      tail -f /usr/local/mongodb/logs/mongodb.log
      To view or debug the operation of MongoDB.
      View MongoDB Process
      ps aux |grep mongodb
      Show
      root     18261  0.0  1.4 150392 29948 ? Sl 12:04 0:00 /usr/local/mongodb/bin/mongod --dbpath=/usr/local/mongodb/data/db --logpath=/usr/local/mongodb/logs/mongodb.log --fork
      Parameter explanation:--dbpath database path (data file)
      --logpath log file path
      --master designated as the main machine
      --slave specified as Slave machine
      --source Specify the IP address of the host machine
      --POLOGSIZE specifies that the log file size does not exceed 64M. Because Resync is very large and time-consuming, it is best to avoid resync by setting a sufficiently large oplogsize (the default oplog size is 5% of the size of the free disk).
      --logappend log file End add
      --port Enable port numbers
      --fork running in the background
      --ONLY specifies which database to replicate only
      --slavedelay refers to the time interval from which replication is detected
      --auth If you need to verify permissions login (username and password)

[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.