In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Nosql database-mongodb database!
Mongo DB is a very popular non-relational database (NoSql) in the IT industry, and its flexible data storage method is favored by current IT employees. Mongo DB well implements the object-oriented idea (OO idea). In Mongo DB, each record is a Document object. The biggest advantage of Mongo DB is that all data persistence operations do not need developers to write SQL statements manually, and you can easily implement CRUD operations by calling methods directly.
Windows installation
Here I'm talking about the command line installation method.
Get ready. Go to the official website to download the corresponding version of https://www.mongodb.org/
Pay attention to distinguish between 32-bit and 64-bit
1. Extract the downloaded mongodb-win32-i386-1.8.1.zip, create the path D:\ mongodb, and Copyto the extracted Bin file under this folder
two。 Pay attention to installation (please read it carefully)
-bind_ip binds the service IP. If it is bound to 127.0.0.1, it can only be accessed locally, and all local IP-logpath log files are not specified by default. Note that the specified file is not a directory-logappend writes the log using appended method-dbpath specifies the database path-port specifies the service port number, and the default port 27017-serviceName specifies the service name-serviceDisplayNam specifies the service name, which is executed when there are multiple mongodb services. -install is specified as a Windows service installation.
3. Install (run cmd to open the dos window to execute the following statement, but the red item should be modified according to your own path and configuration corresponding to the meaning of 3 installation) mongod-- bind_ip 127.0.0.1-- logpath "D:\ mongo\ data\ dbConf\ mongodb.log"-- logappend-- dbpath "D:\ mongo\ data\ db"-- port27017-serviceName "aiyouyang1"-- serviceDisplayName "aiyouyang2"-- install
4. Check whether the installation is successful
(1) execute mongod under the previous directory (D:\ mongodb\ bin)-- dbpath D:\ data\ db (2) Open http://localhost:27017/ on the browser and the following statement appears (3) It looks like you are trying to accessMongoDB over HTTP on the native driver port. (installed successfully)
Mac installation
download
Https://www.mongodb.com/download-center#community
Decompress and rename
Tar-zxvf mongodb-osx-ssl-x86_64-3.6.3.tgz
Mv mongodb-osx-ssl-x86_64-4.0.4 mongodb
Global environment configuration
Export PATH=/yourPath/mongodb/bin:$PATH
Create a new data storage directory and modify permissions
Sudo mkdir-p / data/db
Sudo chomd 777 / data/db
Start
Mongod
Summary
The above is the whole content of this article. I hope the content of this article has a certain reference and learning value for everyone's study or work. Thank you for your support. If you want to know more about it, please see the relevant links below.
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: 225
*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.