• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to Install MongoDB 4.0.11 Version On CentOS 7.6

  • 01:12 cd /etc/yum.repos.d/
  • 01:19 vim mongodb-org-4.0.repo
  • 01:34 yum install mongodb-org -y
  • 01:56 systemctl enable mongod
  • 02:05 systemctl status mongod
  • 02:23 netstat -tulpn | grep mongod
  • 02:38 mongod --version
{{postValue.id}}

Installation Of MongoDB 4.0.11 Version On CentOS 7.6

Default Port : 27017

Package name : mongodb-org (mongodb-org-{server,shell,tools,mongos}

Repository

[mongodb-org-4.0]

name=MongoDB Repository

baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/

gpgcheck=1

enabled=1

gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc

Installation process:

Navigate to the repositories location

[root@linuxhelp ~]# cd /etc/yum.repos.d/

Create a repo file for ther mongodb version

[root@linuxhelp yum.repos.d]# vim mongodb-org-4.0.repo
[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc

Install the MongoDB Version 4.0

[root@linuxhelp yum.repos.d]# yum install mongodb-org -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: ftp.jaist.ac.jp
 * extras: mirrors.viethosting.com
 * updates: mirror.dhakacom.com
base                                                                                                                  | 3.6 kB  00:00:00     
extras                                                                                                                | 3.4 kB  00:00:00     
mongodb-org-4.0                                                                                                       | 2.5 kB  00:00:00     
updates                                                                                                               | 3.4 kB  00:00:00     
.
.
.
.
.
.
Installed:
mongodb-org.x86_64 0:4.0.11-1.el7                                                                                                          
Dependency Installed:
  mongodb-org-mongos.x86_64 0:4.0.11-1.el7       mongodb-org-server.x86_64 0:4.0.11-1.el7       mongodb-org-shell.x86_64 0:4.0.11-1.el7      
  mongodb-org-tools.x86_64 0:4.0.11-1.el7       

Complete!

Start and Enable the service of MongoDB

[root@linuxhelp ~]# systemctl start mongod
[root@linuxhelp ~]# systemctl enable mongod

Check the status of MongoDB

[root@linuxhelp ~]# systemctl status mongod
● mongod.service - MongoDB Database Server
   Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2019-08-06 15:33:04 IST; 1min 34s ago

Verify the port number of MongoDB

[root@linuxhelp ~]# netstat -tulpn | grep mongod
tcp        0      0 127.0.0.1:27017         0.0.0.0:*               LISTEN      24465/mongod        

Verify the version of MongoDB

[root@linuxhelp ~]# mongod --version
db version v4.0.11
git version: 417d1a712e9f040d54beca8e4943edce218e9a8c
OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
allocator: tcmalloc
modules: none
build environment:
    distmod: rhel70
    distarch: x86_64
    target_arch: x86_64

With this, Installation Of MongoDB 4.0.11 version on CentOS 7.6

Tags:
landon
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What is Mongodb?

A

MongoDB is a cross-platform document oriented database program which supports various forms of data

Q

Is MongoDB similar to MYSQL?

A

MongoDB is unlike MYSQL.

Q

What is the configuration file of MongoDB ?

A

The configuration file of MongoDB is /etc/mongod.conf

Q

What is the Location of MongoDB Log File ?

A

The location of MongoDB Log file is /var/log/mongodb/mongod.log

Q

What is the location of DATa Directory of MongoDB?

A

The Location of MongoDB data Directory is /var/lib/mongo

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Isaiah ?
What is the use of SUID & SGID commands

How to set the special permissions to the files and folders using SUID and SGID commands...

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.