- #INSTALL MONGODB ON LINUX HOW TO#
- #INSTALL MONGODB ON LINUX INSTALL#
- #INSTALL MONGODB ON LINUX DOWNLOAD#
- #INSTALL MONGODB ON LINUX FREE#
#INSTALL MONGODB ON LINUX DOWNLOAD#
This will download the latest stable version of MongoDB from the official MongoDB repositories.
#INSTALL MONGODB ON LINUX INSTALL#
The first command will install the Community release the second one is for Enterprise: Just run one of the following yum commands as root. If you thought that was easy, the next step was even easier (thanks to the magic of yum). Or, for the Enterprise version, fill the file with:īaseurl=$releasever/mongodb-enterprise/stable/$basearch/ Next, open up that file in your favorite text editor (on RHEL, I prefer gedit when working from the GUI, or vi if I'm on the CLI), and populate it with the following lines for the Community Edition:īaseurl=$releasever/mongodb-org/3.2/x86_64/ First, create a file called /etc//mongodb-org-3.2.repo (for the Community Edition of MongoDB) or /etc//mongodb-enterprise.repo (for Enterprise). The first step is to configure the yum package manager. Now that the boring stuff is out of the way, let's install MongoDB.
#INSTALL MONGODB ON LINUX FREE#
(The Community Edition is free the Enterprise option, which offers some extra features, requires a commercial license.) The installation steps are basically the same, but the specifics vary, as noted below. Lastly, the steps below cover installation of both the Community Edition and Enterprise versions of MongoDB. For details, check out the MongoDB 3.2 release notes. MongoDB 3.2 offers a number of features not present in earlier releases, such as a totally new default storage engine (WildTiger) and a lot of handy new programming operators. At the time of this writing, that's version 3.2, which debuted in early 2016 (and has had a few minor updates since).
Note also that this guide is designed to allow you to install the latest stable version of MongoDB on RHEL. So your RHEL server needs to be running a 64-bit kernel to follow this guide. While it's technically possible to install MongoDB on a 32-bit RHEL system using outdated, archived versions of MongoDB packages, you probably don't want to do that-certainly not if you have any intention of using MongoDB in a production environment. You should also know that MongoDB no longer supports 32-bit systems. You could also compile MongoDB from source, but that is a lot more complicated and, for my money, not worth the trouble (pace, Gentoo fans). I also assume you want to install MongoDB using RPM packages and the yum package manager, which ships with RHEL. (MongoDB does not support RHEL 5 or earlier.) It probably works pretty well for CentOS and other RHEL derivatives, but I haven’t tested those.
First, know that this guide applies to systems running RHEL 6 or later. Preliminary Notes on MongoDB Installationīefore delving into the installation steps, we should go over some prerequisites.
#INSTALL MONGODB ON LINUX HOW TO#
For now, let's move onto the meat of this post, which is how to install MongoDB on Red Hat Enterprise Linux (RHEL) in order to take advantage of NoSQL databases. (I could also write a great deal about when not to use NoSQL-and that’s important, because despite NoSQL's current trendiness, it's not better in all contexts.)īut that's all fodder for a separate blog post.
There's a lot more to say about what makes MongoDB, and NoSQL in general, a better fit for some situations.
That makes the NoSQL approach ideal for situations where you don't know how much data you have to handle, what form it is in, or how quickly it is going to move around. With MongoDB, you don't need to spend time creating tables before you can process your data. Instead, they use a flexible document-based model, similar to Python dictionaries or Ruby hashes. The biggest advantage is that MongoDB databases don't require developers to define schemas before adding data to a database. NoSQL databases offer a variety of advantages in many cases MongoDB has evolved into one of the most popular open source "NoSQL" databases-so-called because they dispense with the tabular storage schema of relational databases like MySQL and Postgres.