In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you the "mongodb database how to achieve download, installation, startup, connection operation", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to download, install, start, connect operation in the mongodb database" this article.
Brief introduction:
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.
1. Download
Download the compressed package from the official website
Official website address: https://www.mongodb.com/download-center/v2/community.
Download command:
Wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel70-4.0.3.tgz
2. Decompression
Tar zxvf mongodb-linux-x86_64-rhel70-4.0.3.tgz# move the directory to where you want it rm-rf / usr/local/mongodb/mv mongodb-linux-x86_64-rhel70-4.0.3 / usr/local/mongodb
Catalogue introduction:
3. Start the service
MongoDB's data is stored in the db directory of the data directory, but this directory is not automatically created during installation, so you need to manually create the data directory and the db directory.
Note:
(1) / data/db is the default startup database path for MongoDB. The custom specified path is configured with the parameter-dbpath.
(2) check the directory permissions after creating the directory, otherwise the startup will fail.
(3) because mongodb takes up disk space, check the available space to configure the data and log storage location (df-h), and reserve about 4G. If you add the-- smallfiles option when starting, it will only take up about 400MB.
Start:
[test@localhost bin] $. / mongod-- dbpath=/mongodb/db-- logpath=/mongodb/log/mongodb.log-- fork-- port=270172018-10-16T13:35:44.345+0800 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify-- sslDisabledProtocols' none'about to fork child process, waiting until server is ready for connections.forked process: 1415child process started successfully, parent exiting
Parameter explanation:
-- dbpath data storage directory
-- logpath log storage directory
-- fork runs as a background process
4. Connect the service
[test@localhost bin] $. / mongoMongoDB shell version v4.0.3connecting to: mongodb://127.0.0.1:27017Implicit session: session {"id": UUID ("65e265a1-bb45-4842-9c1b-b6171dc5d178")} MongoDB server version: 4.0.3. > show databases;admin 0.000GBconfig 0.000GBlocal 0.000GB is all the contents of this article "how to download, install, start and connect in mongodb database". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, 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.