Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

[HowTo] Install MongoDB 4.0 on VestaCP with Centos 7/RHEL 7

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
1 post • Page 1 of 1
xorro
Posts: 87
Joined: Sun Nov 13, 2016 3:11 pm
Contact:
Contact xorro
Website Skype

Os: CentOS 6x
Web: apache + nginx
[HowTo] Install MongoDB 4.0 on VestaCP with Centos 7/RHEL 7
  • Quote

Post by xorro » Tue Sep 11, 2018 6:59 pm

Step 1

Adding MongoDB 4.0 Repository :

Create repo file :

Code: Select all

yum install nano -y
nano /etc/yum.repos.d/mongodb4.repo
Now add this lines to mongodb4.repo :

Code: Select all

[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 :

Code: Select all

yum install -y mongodb-org
If you’ve enabled selinux you need to run this command in order to give access :

Code: Select all

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 :

Code: Select all

service mongod start
To restart and stop MongoDB Service :

Code: Select all

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

Code: Select all

mongo
To enable mogodb start automatically during os boot :

Code: Select all

systemctl enable mongod
Top


Post Reply
  • Print view
1 post • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password