Installing MongoDB records via Yum under CentOS 6.5

Source: Internet
Author: User

Recently wanted to try Intel's WebRTC-based collaborative communications Development Kit, where the CS_WEBRTC_CONFERENCE_SERVER_MCU relies on MongoDB.

What is MongoDB?

MongoDB is a database based on distributed file storage. Written by the C + + language. Designed to provide scalable, high-performance data storage solutions for WEB applications.

MongoDB is a product between a relational database and a non-relational database, and is the most versatile and most like relational database in a non-relational database.

Installing MongoDB

Reference: https://docs.mongodb.org/getting-started/shell/tutorial/install-mongodb-on-red-hat/

https://docs.mongodb.org/getting-started/shell/tutorial/install-on-linux/

1. Create Repo

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

[Mongodb-org-3.2]name=mongodb repositorybaseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2 /x86_64/gpgcheck=0enabled=1

2. Installing MongoDB and related tools

sudo yum install-y mongodb-org

3. Start MongoDB

sudo service Mongod start
4. Verify that MongoDB is starting successfully

Cat /var/log/mongodb/mongod.log

See if there is a sentence: [Initandlisten] waiting for connections on port <port>

Where <port> is configured in/etc/mongod.conf, Port 27017 is the default.

5. Enable MongoDB to boot automatically

sudo chkconfig mongod on

6. Stop MongoDB

sudo service Mongod stop

7. Restart MongoDB

sudo service mongod restart

Server configuration:/etc/mongod.conf

# mongo.conf #where to log logpath=/var/log/mongo/mongod.log logappend=true #以追加方式写入日志 # Fork and run in BAC Kground Fork = True #port = 27017 #端口 dbpath=/var/lib/mongo #数据库文件保存位置 directoryperdb=true# enables periodic lo  Gging of CPU Utilization and I/O wait #启用定期记录CPU利用率和 I/o waits #cpu = true # Turn on/off security.   Off is currently whether the default # is run as a secure authentication, a non-secure way of not authenticating #noauth = True #auth = true # Verbose logging output. # verbose logging Output #verbose = true # Inspect all client data for validity on receipt (useful for # Developing drivers) used to develop drivers Check that the client receives the validity of the data #objcheck = true # Enable DB quota management enables database quota management, the default per db can have 8 files, can be set with the Quotafiles parameter #quota = TR  UE # set Oplog record rank # set oplogging level where n is # 0=off (default) # 1=w # 2=r # 3=both # 7=w+some  Reads #oplog = 0 # diagnostic/debugging option Dynamic Debug Item #nocursors = true # Ignore query hints ignored #nohints = True # Disable HTTP interface, default to localhost:28017 # DisabLe the HTTP interface (Defaults to localhost:27018). This port number is written incorrectly #nohttpinterface = true # Close the server-side script, which will greatly limit the functionality # Turns  Off Server-side scripting. This would result in greatly limited # functionality #noscripting = true # Closes the scan table, any query will be scan failed # Turns off table scans  .   Any query this would do a table scan fails.   #notablescan = true # to close the data file pre-allocation # Disable the preallocation.   #noprealloc = true # Specifies the size of the. ns file for the new database, in MB # specify. ns file size for new databases.   # nssize = <size> # accout token for Mongo monitoring server.   #mms-token = <token> # Mongo The name of the Monitoring Server # server name for Mongo monitoring server.   #mms-name = <server-name> # Mongo Monitoring Server ping interval # ping interval for Mongo monitoring server. #mms-interval = <seconds> # Replication options Copy option # in replicated MONGO databases, specify here whether T He is a slave or master in replication, specifies that the current dependency #slave = True #source = master.example.com # slave only:specify a single dat ABase to replicate #only = master.example.com # or #master = True #source = slave.example.com   

Summary through Yum installation is very simple and convenient,

Problems that do not require tangled dependencies.

Please refer to the official documentation for more information.


Installing MongoDB records via Yum under CentOS 6.5

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.