MONGODB
Install the nano editor by typing
MongoDB is a document-oriented database. It is free and open-source. It is written in c++. It is NoSQL based database.
PREREQUISITES- CentOS- 64 bit
- User with sudo permission
YUM (Yellowdog Updater Modified) is an open source package management tool for RPM (RedHat
Package Manager) based Linux systems.
INSTALLATION PROCEDURE
1.)INSTALL THE NANO TEXT EDITORInstall the nano editor by typing
sudo yum install nano2.)ADD THE MONGODB REPOSITORY
MongoDB provides officially supported packages in their own repository. This repository contains the following packages:
- mongodb-org - This package is a metapackage that will automatically install the four component packages listed below.
- mongodb-org-server - This package contains the mongod daemon and associated configuration and init scripts.
- mongodb-org-mongos - This package contains the mongos daemon.
- mongodb-org-shell - This package contains the mongo shell.
- mongodb-org-tools - This package contains the following MongoDB tools: mongoimport bsondump, mongodump, mongoexport, mongofiles, mongooplog, mongoperf, mongorestore, mongostat, and mongotop.
sudo nano /etc/yum.repos.d/mongodb-org.repo
Populate the mongodb-org.repo by adding
Before installing the MongoDB, update all the packages[mongodb-org-3.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/
gpgcheck=1enabled=1gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc
sudo yum -y update3.)INSTALL THE MONGODB
And then install the MongoDB by
sudo yum install -y mongodb-orgIf you need to install the specific version of MongoDB means, simply append the version number to each package
sudo yum install -y mongodb-org-3.4 mongodb-org-server-3.4 mongodb-org-shell-3.4 mongodb-org-mongos-3.4 mongodb-org-tools-3.4yum will upgrade the MongoDB package whenever a new version becomes available. If you don’t need this means, pin a package. To pin a package, in /etc/yum.conf file. Go to /etc/yum.conf file by
sudo nano /etc/yum.conf
Ad the below lines to restrict that one
exclude=mongodb-org,mongodb-org-server,mongodb-org-shell,mongodb-org-mongos,mongodb-org-toolsREFERENCE: https://docs.mongodb.com/v2.8/tutorial/install-mongodb-on-red-hat/
Comments
Post a Comment