Install MongoDB on Fedora, Red Hat Enterprise and CentOS

In this Tutorial we will learn how to Install MongoDB on different Flavors on Linux i.e fedora, Redhat Enterprise and CentOS.

Considerations

For production deployments, always run MongoDB on 64-bit systems.

The default /etc/mongodb.conf configuration file supplied by the 2.6 series packages has bind_ip`set to 127.0.0.1 by default. Modify this setting as needed for your environment before initializing a replica set.
Changed in version 2.6: The package structure and names have changed as of version 2.6. For instructions on installation of an older release, please refer to the documentation for the appropriate version.


Install Mongodb 


Lets begin with the installation of Mongodb with YUM.

 Step 1: Add the Mongodb repo in package management system (YUM) in fedora.
 Create a /etc/yum.repos.d/mongodb.repo file which should have the following  configuration information for the MongoDB repository:

 [mongodb]

 name=MongoDB Repository

 baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/

 gpgcheck=0

 enabled=1

  

The Above configuration will work with 64-bit system,if You are running a 32-bit configuration please use the given below Confiugration:





[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/i686/
gpgcheck=0
enabled=1



Step 2: Once you have successfully done the changes in the package management system (YUM),It's time to install the Mongodb on the system i.e  fedora, Red Hat Enterprise and CentOS :



To install the latest stable version of MongoDB, simply issue the following command:
  sudo yum install -y mongodb-org

if you want to use a specific version of mongodb,You have  to specify each component package individually and append the version number to the package name,An example is shown below:
   sudo yum install -y mongodb-org-2.6.1 mongodb-org-server-2.6.1 mongodb-org-shell-2.6.1 mongodb-org-mongos-2.6.1 mongodb-org-tools-2.6.1


If you have completed the above two steps successfully,You have installed  mongodb in fedora or Redhat Enterprise .Thanks!!

author image

Written by

Experience running high-traffic web services, service configuration, monitoring,troubleshooting and change management.Expertise in Linux/Unix system administration, including configuration, troubleshooting, Python scripting language.

0 comments:

 

© 2013 Akhil's Blog. All rights resevered. Designed by Templateism

Back To Top