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--
Update MongoDB 2.6 to 3.0 via Yum
Due to the previous use of MongoDB 2.6 installed by yum (according to the official website, if you are going to upgrade from 2.4, you need to upgrade to version 2.6 first, and then upgrade to 3.0), in order to use many new features of MongoDB, such as WiredTiger engine, Chinese search, etc., according to the MongoDB version, the even number is a stable version So I decided to upgrade to the latest MongoDb 3.2 (MongoDB 3.3was the latest version at the time of this writing).
In fact, it can be upgraded normally according to the documentation given on the official website. This article also refers to the official website documentation to upgrade. If you are going to refer to this article, you hope that you can test it in the test environment and then go online to avoid problems.
Upgrade begins:
Exit the MongoDB 2.6 service
Service mongod stop
There are many ways to exit, such as using netstat-nltp to find the process number, use and then kill the process (it is not recommended to use-9 to force back directly)
For example, enter the Mongo client and use db.shutdownServer () to close
Or use the official website recommendation method and so on, not listed here one by one, please choose to use.
Mongod-dbpath / var/mongod/data-shutdown
two。 New yum Feed
Vim / etc/yum.repos.d/mongodb-org-3.0.repo
Edit content:
[mongodb-org-3.0] name=MongoDB Repositorybaseurl= https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.0/x86_64/gpgcheck=1enabled=1gpgkey=https://www.mongodb.org/static/pgp/server-3.0.asc
3.Yum upgrade begins
Check the yum information.
Yum info mongodb-org
Start the upgrade and wait for the upgrade to complete
Yum upgrade mongodb-org
4. Try to start the service
Service mongod start
Found that startup failed? Don't worry, let's check the log (the log path is the default path, which can be modified using the configuration file)
Tail-f / var/log/mongodb/mongod.log2016-06-27T02:53:32.961-0700 E NETWORK [initandlisten] Failed to unlink socket file / tmp/mongodb-27017.sock errno:1 Operation not permitted2016-06-27T02:53:32.961-0700 I-[initandlisten] Fatal Assertion 285782016-06-27T02:53:32.961-0700 I-[initandlisten] * * aborting after fassert () failure
According to the log prompt, the unlink sock file is not available, so we need to delete the sock file manually and run it after deletion.
Finally, you can repeat the previous steps to upgrade 3. 0 to 3. 2, and change the YUM source of MongDB to 3. 2 to complete the upgrade.
Note: according to the official website, the WiredTiger engine is enabled by default.
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.