In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you how to install MongoDB server on Fedora. I hope you will get something after reading this article. Let's discuss it together.
Mongo (from "humongous"-huge) is a high-performance, open-source, schemaless, document-oriented database, and it is one of the most popular NoSQL databases. It uses JSON as the document format and can be extended and replicated across multiple server nodes.
Stories about license changes
It has been more than a year since the MongoDB upstream decided to change the server code license. The previous license was GNU Affero General Public License v3 (AGPLv3). However, the upstream company has written a new license designed to enable companies running MongoDB as a service to give back to the community. The new license is called Server Side Public License (SSPLv1), and for more information on this initiative and its explanation, see MongoDB SSPL FAQ.
Fedora has always included only free software. When SSPL was released, Fedora determined that it was not a free software license. All MongoDB versions released before the license change date (October 2018) can be retained in Fedora, but packages that are never updated after that can cause security problems. Therefore, starting with Fedora 30, the Fedora community decided to remove the MongoDB server completely.
What are the developers' options?
Yes, there are alternatives. For example, PostgreSQL also supports JSON in the latest version, which can be used when MongoDB can no longer be used. With the JSONB type, the index works well in PostgreSQL, its performance is comparable to that of MongoDB, and it is not even affected by ACID.
The technical reasons why developers may choose MongoDB do not change with the license, so many people still want to use it. It is important to realize that SSPL license changes are only for MongoDB servers. Other projects have also been developed in the upstream of MongoDB, such as MongoDB tools, C and C++ client libraries, and connectors for various dynamic languages, which are used by the client (in applications that communicate with the server over the network). Because the licensors of these packages remain free (mainly Apache licenses), they remain in the Fedora repository, so users can use them for application development.
The only change is actually the server package itself, which has been completely removed from the Fedora repository. Let's take a look at how Fedora users can get non-free packages.
How to install a MongoDB server from upstream
When Fedora users want to install the MongoDB server, they need to get the MongoDB directly upstream. However, the upstream does not provide RPM packages for Fedora. Instead, the MongoDB server can get the source tarball, and users need to compile it themselves (which requires some development knowledge), or Fedora users can use some compatible packages. Among the compatible options, the best choice is RHEL-8 RPM. The following steps describe how to install them and how to start the daemon.
1. Create a warehouse using upstream RPM (RHEL-8 build)
$sudo cat > / etc/yum.repos.d/mongodb.repo > > EOF [mongodb-upstream] name=MongoDB Upstream Repositorybaseurl= https://repo.mongodb.org/yum/redhat/8Server/mongodb-org/4.2/x86_64/gpgcheck=1enabled=1gpgkey=https://www.mongodb.org/static/pgp/server-4.2.ascEOF
2. Install meta software packages to pull servers and toolkits
Sudo dnf install mongodb-org.Installed: mongodb-org-4.2.3-1.el8.x86_64 mongodb-org-mongos-4.2.3-1.el8.x86_64 mongodb-org-server-4.2.3-1.el8.x86_64 mongodb-org-shell-4.2.3-1.el8.x86_64 mongodb-org-tools-4.2.3-1.el8.x86_64 Complete!
3. Start the MongoDB daemon
$sudo systemctl status mongod ● mongod.service-MongoDB Database Server Loaded: loaded (/ usr/lib/systemd/system/mongod.service; enabled; vendor preset: disabled) Active: active (running) since Sat 2020-02-08 12:33:45 EST 2s ago Docs: https://docs.mongodb.org/manual Process: 15768 ExecStartPre=/usr/bin/mkdir-p / var/run/mongodb (code=exited, status=0/SUCCESS) Process: 15769 ExecStartPre=/usr/bin/chown mongod:mongod / var/run/mongodb (code=exited, status=0/SUCCESS) Process: 15770 ExecStartPre=/usr/bin/chmod 0755 / var/run/mongodb (code=exited, status=0/SUCCESS) Process: 15771 ExecStart=/usr/bin/mongod $OPTIONS (code=exited Status=0/SUCCESS) Main PID: 15773 (mongod) Memory: 70.4m CPU: 611ms CGroup: / system.slice/mongod.service
4. Use mongo shell to connect to the server to verify whether it is running.
$mongoMongoDB shell version v4.2.3connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodbImplicit session: session {"id": UUID ("20b6e61f-c7cc-4e9b-a25e-5e306d60482f")} MongoDB server version: 4.2.3Welcome to the MongoDB shell.For interactive help, type "help" .for more comprehensive documentation, see http://docs.mongodb.org/
That's it. As you can see, the RHEL-8 package is perfectly compatible, and as long as the Fedora package is compatible with RHEL-8, it should always be compatible. Please note that you must comply with the SSPLv1 license when using it.
After reading this article, I believe you have a certain understanding of "how to install MongoDB server on Fedora". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!
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.