Mystery Data
  • Home
  • Tutorials
    • WordPress
    • Linux
    • Centos
    • MySQL/MariaDB
  • Control Panel
    • CWP
    • Vesta CP
  • Contact Me
  • Privacy Policy

Mystery Data

  • Home
  • Tutorials
    • WordPress
    • Linux
    • Centos
    • MySQL/MariaDB
  • Control Panel
    • CWP
    • Vesta CP
  • Contact Me
  • Privacy Policy
CentosControl PanelCWPLinuxVesta CP

How to Install MongoDB 4.0 on Centos 7/RHEL 7

by Sandy July 17, 2018
written by Sandy July 17, 2018

In this tutorial we’ll  Install MongoDB 4.0 on Centos 7/RHEL 7 linux OS. MongoDB is an open-source document database that provides high performance, high availability, and automatic scaling. it is recommended for business and enterprise uses although you can also use in your production environment. It is a NoSQL database. MongoDB 4.0 supports multi-document ACID transactions.

Step 1

Adding MongoDB 4.0 Repository  :

Create repo file :

yum install nano -y
nano /etc/yum.repos.d/mongodb4.repo

Now add this lines to mongodb4.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

Save and exit

Step 2

Installing MongoDB 4.0 :

yum install -y mongodb-org

If you’ve enabled selinux you need to run this command in order to give access :

semanage port -a -t mongod_port_t -p tcp 27017

*use this command if you’re using enforcing mode

Step 3

Verify the installation and enable startup :

Start MongoDB Service :

service mongod start

To restart and stop MongoDB Service :

service mongod restart
service mongod stop

you need to run this command from command line in order to access mongo db CLI interface :

mongo

To enable mogodb start automatically during os boot :

systemctl enable mongod

If this post helps you in any way please consider a donation

md-donate
0 comment
0
FacebookTwitterGoogle +Pinterest
previous post
How to Flush/Clear/Delete Postfix Mail Queue
next post
How to Enable open_basedir with suPHP globally and for Per User Basis on CWP – Centos WebPanel

You may also like

How to Upgrade PHP 5.6 to PHP 7.3...

December 29, 2018

How to Install/build PHP 7.3 manually on CWP...

December 29, 2018

Update/Upgrade to MariaDB 10.3 on VestaCP/CWP/CentOS 7

September 8, 2018

Upgrade/Update to Latest Version of TeamSpeak 3 in...

September 1, 2018

Increase Import/Upload limit for phpMyAdmin and File Manager...

August 27, 2018

How to Enable HTTP/2 for Apache in CWP...

August 17, 2018

How to Configure/Install Let’s Encrypt SSL on VestaCP...

August 12, 2018

How to Install CyberPanel – OpenLiteSpeed Control Panel...

July 24, 2018

How to Install Memcached and Redis PHP Extensions...

July 23, 2018

How to Enable open_basedir with suPHP globally and...

July 21, 2018

Leave a Comment Cancel Reply

Save my name, email, and website in this browser for the next time I comment.

md-donate

Recent Posts

  • How to Upgrade PHP 5.6 to PHP 7.3 on CentOS VestaCP
  • How to Install/build PHP 7.3 manually on CWP – Centos Web Panel
  • Update/Upgrade to MariaDB 10.3 on VestaCP/CWP/CentOS 7
  • Upgrade/Update to Latest Version of TeamSpeak 3 in CWP
  • Increase Import/Upload limit for phpMyAdmin and File Manager in CWP
  • How to Enable HTTP/2 for Apache in CWP with mod_http2 module
  • How to Configure/Install Let’s Encrypt SSL on VestaCP Mail Server and Vesta Admin – CentOS and Ubuntu
  • How to Install CyberPanel – OpenLiteSpeed Control Panel on Centos 7
  • How to Install Memcached and Redis PHP Extensions with Php Selector 5.6/7.0/7.1/7.2 CWP- Centos WebPanel
  • How to Enable open_basedir with suPHP globally and for Per User Basis on CWP – Centos WebPanel
Footer Logo

Copyright - Mystery Data