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)05/31 Report--
How to install startup MongoDB, in view of this problem, this article introduces the corresponding analysis and answer in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.
Address:
Https://www.mongodb.com/download-center/enterprise
Download:
[root@cjcos MongoDB] # curl-O https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel70-4.2.3.tgz
[root@cjcos MongoDB] # ll-rth
Total 127M
-rw-r--r-- 1 root root 127m Mar 22 09:04 mongodb-linux-x86_64-rhel70-4.2.3.tgz
1.2 create a directory
[root@cjcos MongoDB] # mkdir / usr/local/mongodb/data/db-p
[root@cjcos MongoDB] # mkdir / usr/local/mongodb/log
[root@cjcos MongoDB] # mkdir / usr/local/mongodb/conf
[root@cjcos MongoDB] # touch / usr/local/mongodb/log/mongodb.log
1.2 Environmental variables
[root@cjcos MongoDB] # export MONGODB_HOME=/usr/local/mongodb
[root@cjcos MongoDB] # export PATH=$PATH:$MONGODB_HOME/bin
[root@cjcos MongoDB] # vim / etc/profile
Export MONGODB_HOME=/usr/local/mongodb
Export PATH=$PATH:$MONGODB_HOME/bin
[root@cjcos MongoDB] # source / etc/profile
[root@cjcos MongoDB] # tar-zxvf mongodb-linux-x86_64-rhel70-4.2.3.tgz
[root@cjcos mongodb] # mv mongodb-linux-x86_64-rhel70-4.2.3 Universe * / usr/local/mongodb/
1.4 setting profile
[root@cjcos conf] # pwd
/ usr/local/mongodb/conf
[root@cjcos conf] # touch mongodb.conf
[root@cjcos conf] # vim mongodb.conf
Dbpath=/usr/local/mongodb/data/db
Logpath=/usr/local/mongodb/log/mongodb.log
Logappend=true
Bind_ip = 0.0.0.0
Fork = true
Port = 27017
1.5 start the database
[root@cjcos ~] # mongod-config / usr/local/mongodb/conf/mongodb.conf
About to fork child process, waiting until server is ready for connections.
Forked process: 13385
Child process started successfully, parent exiting
1.6 FAQ
The 1.6.1:mongodb startup error is as follows
Mongod: / lib64/libc.so.6: version `GLIBC_2.14' not found (required by mongod)
The cause of the problem:
The downloaded installation package (mongodb-linux-x86_64-rhel70-4.2.3.tgz) adapts to the redhat7 version and requires that the GLIBC version is no less than 2.14. in fact, the redhat7 version comes with a GLIBC version of 2.17.
However, on the CentOS release 6.7 system, the default GLIBC version is 2.12, and all failed to start mongodb.
You can consider upgrading the GLIBC version under CentOS6, but there is a great risk, so the production environment should upgrade carefully.
This is the answer to the question about how to install and start MongoDB. I hope the above content can be of some help to you. If you still have a lot of doubts to solve, you can follow the industry information channel for more related knowledge.
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.