In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article shows you the introduction and installation of mongodb, which is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
I. introduction of mongodb
1. What is MongoDB?
MongoDB is written by C++ language. It is an open source database system based on distributed file storage and belongs to NoSQL.
In the case of high load, more nodes can be added to ensure server performance.
MongoDB aims to provide scalable, high-performance data storage solutions for WEB applications
MongoDB stores the data as a document, and the data structure consists of key-value (key= > value) pairs. MongoDB documents are similar to JSON objects. Field values can contain other documents, arrays, and document arrays.
two。 Compared with relational database
3.MogoDB data structure
II. Installation of mongodb
1. Set up a yum source (this is also an officially recommended method)
This time I installed version 3.0, and the official source only supports 64-bit systems.
Vim / etc/yum.repos.d/mongodb-org-3.0.repo
#
[mongodb-org-3.0]
Lname=MongoDBRepository
Baseurl= http://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.0/x86_64/
Gpgcheck=0
Enabled=1
#
two。 Install and configure MongoDB
It is easy to install yum install-y mongodb-org
Edit the configuration file vim/etc/mongod.conf and modify it as follows:
Fork: true
PidFilePath:/var/run/mongodb/mongod.pid
Delete the comments at the beginning of the # after these two lines, otherwise there will be a problem when you restart
To bind multiple ip, write multiple ip after bind_ip, separated by commas, and listen for all ip left blank.
3. Start MongoDB
Echo never > / sys/kernel/mm/transparent_hugepage/enabled
Echo never > / sys/kernel/mm/transparent_hugepage/defrag
Vim / etc/security/limits.conf adds the following:
Mongod soft nofile 64000
Mongod hard nofile 64000
Mongod soft nproc 32000
Mongod hard nproc 32000
Launch: service mongod start
The startup process will be slow, it is writing data / var/lib/mongo
The above is the introduction and installation method of mongodb. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.