MongoDB Full Configuration

Source: Internet
Author: User

1, download & install

MongoDB provides the CentOS Yum installation method.
Reference: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat/
PDF Brochure:
Http://docs.mongodb.org/manual/MongoDB-manual.pdf

Vi/etc/yum.repos.d/mongodb-org-3.0.repo

[mongodb-org-3.0]name=MongoDB Repositorybaseurl=http://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.0/x86_64/gpgcheck=0enabled=1

Installing MongoDB

-y mongodb-org

All related services are installed.

...... Running Transaction Installing:mongodb-org-shell-3.0.2-1.el7. x86_641/5 Installing:mongodb-org-tools-3.0.2-1.el7. x86_642/5 Installing:mongodb-org-mongos-3.0.2-1.el7. x86_643/5 Installing:mongodb-org-server-3.0.2-1.el7. x86_644/5 Installing:mongodb-org-3.0.2-1.el7. x86_645/5 Verifying:mongodb-org-3.0.2-1.el7. x86_641/5 Verifying:mongodb-org-server-3.0.2-1.el7. x86_642/5 Verifying:mongodb-org-mongos-3.0.2-1.el7 .x86_64 3/5 verifying:mongodb< Span class= "Hljs-attribute" >-org-tools- 3.0.2- 1.el7.x86_64 4/5 Verifying: Mongodb-org-shell-3.0.2-1.el7< Span class= "hljs-built_in" >.x86_64 5/5     

Configuration files in:/etc/mongod.conf
Data files in:/var/lib/mongo
Log files in:/var/log/mongodb

2, configure the port number of the. conf

Note: After the mongodb3.x version is the configuration file to YAML syntax format, the following is the YAML configuration file format as follows:
Official Yaml Profile Options reference: https://docs.mongodb.org/manual/... #configuration-file
You can only use spaces, do not support the TAB key, remember, and "Colon" is also a space behind

In order for the local visualizer to view the MONGDB database, you first need to change the port number

Vim/etc/mongod.conf

Operating instructions under the 3,service

MongoDB Service Usage

#启动service mongod start#停止service mongod stop#重启service mongod restart#增加开机启动chkconfig mongod on
4, Start | Enable authentication (also configured in. conf files)
Security:authorization:disabled
5, set the user

First, you create a super administrator when you do not have permission authentication turned on.

MongoDB Full Configuration

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.