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)06/01 Report--
Introduction to mongodb:
MongoDB is a product between relational database and non-relational database, which is the most functional and most like relational database in non-relational database. The data structure he supports is very loose, which is similar to json's bjson format, so it can store more complex data types. The most important feature of Mongo is that the query language it supports is very powerful, and its syntax is somewhat similar to the object-oriented query language. It can almost achieve most of the functions similar to the single table query of relational database, and also supports the establishment of data indexing.
In this lab, we will install the mongodb3.6.6 database and do a series of operations.
1. Installation: configuring YUM source repository
Add the following:
[mongodb-org]
Name=MongoDB Repository
Baseurl= https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.6/x86_64/
Gpgcheck=1
Enabled=1
Gpgkey= https://www.mongodb.org/static/pgp/server-3.6.asc
Next, install:
Configure the configuration file:
# modify listening address and port
Start the service:
Enter Mongodb:
View the database:
Insert data into the collection:
View the contents of the collection:
Modify the data in the collection:
Insert 100 pieces of data:
View the data:
Find the 10th data:
two。 Import and export: export the collection info in the database school:
Import into the database:
# as you can see, info1 is already in school
3. Backup and recovery:
4. Clone the collection:
Create a data file and log file storage location:
Modify the configuration file:
Start the instance and enter the port:
Clone the collection:
Copy the database:
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.