In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
MongoDB is a database based on distributed file storage. Written in C++ language. Designed to provide scalable high-performance data storage solutions for WEB applications.
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 bson 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.
This information is summarized on the official website.
I. installation
1. Configure the system yum source
Cd / etc/yum.repo.d/touch mongodb-org-3.4.repovi mongodb-org-3.4.repo # add the following content [mongodb-org-3.4] name=MongoDB Repositorybaseurl= https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/gpgcheck=1enabled=1gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc save exit!
2. Install MongoDB online using yum
Sudo yum install-y mongodb-org# installation mongodb installs the mongodb-org package and its dependent packages mongodb-org-server, mongodb-org-mongos, mongodb-org-shell, mongodb-org-tools
3. Close selinux
Sed-I's etc/selinux/config# is required to restart the server. Setenforce 0 # is effective temporarily. The server restart is invalid.
4. Turn off the firewall or open the port
Systemctl stop firewalld # turn off the firewall
Or open port number
Firewall-cmd-- zone=public-- add-port=27017/tcp # mongodb default port number firewall-cmd-- reload # reload firewall
5. Enable MongoDB
Sudo service mongod start # enable MongoDBsudo chkconfig mongod on # join boot boot sudo service mongod restart # restart MongoDB
6. Close MongoDB
Sudo service mongod stop # turn off the firewall
7. Uninstall MongoDB
Sudo yum erase $(rpm-qa | grep mongodb-org) # Uninstall MongoDBsudo rm-r / var/log/mongodb # Delete log files sudo rm-r / var/lib/mongo # Delete data files
8. Recommend MongoDB commands
Https://www.jb51.net/article/77527.htm
Summary
The above is the method of Centos7 installation and uninstallation of Mongodb database introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support to the website!
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.