

- #Install mongo shell how to#
- #Install mongo shell full#
- #Install mongo shell password#
- #Install mongo shell download#
In this article we have covered How to Install MongoDB on Amazon Linux 2 and Connect MongoDB using compass. Step 3: Now click on connect Now you have connected to MongoDB server using compass.
#Install mongo shell password#
Step 2: Now you can see here in Hostname you need to paste your instance ip_address in Authentication you need to choose Username / Password then when we have created a user so there we assign username and password so same you have to assign username and password here. Step 1: Click on Fill in connection fields individually new connection

Now you need to install MongoDB Compass in your machine next step is Now let’s create the administrator username and set a password for the username: > db.createUser() How to access MongoDB using compass Inside the mongo shell type this command to switch to the admin database: >use admin Step 4: Configuring MongoDB administrator usernameĬonfiguring MongoDB administrator username : mongo Now restart the MongoDB service using below command: sudo systemctl restart mongod Open MongoDB configuration file /etc/nf and change bindIp by adding required sudo nano /etc/nf # network interfaces net: port: 27017 bindIp: 127.0.0.1īindIp: 0.0.0.0 # to bind to all interfacesĪfter change in file you need to restart mongodb service Using below command to check service is running or not : sudo systemctl status mongodĮnable MongoDB service at System startup using below command : sudo systemctl enable mongodīy default, MongoDB is listening on 127.0.0.1:27017 only:

Reload the system daemon to apply changes : sudo systemctl daemon-reload Start the MongoDB service using below command : sudo systemctl start mongod You can specify any available version of MongoDB add the following exclude directive to your /etc/yum.conf file: exclude=mongodb-org,mongodb-org-database,mongodb-org-server,mongodb-org-shell,mongodb-org-mongos,mongodb-org-tools Install MongoDB using below command : sudo yum install -y mongodb-org Step 2: How to Install MongoDB on Amazon Linux 2 Step 1: Configure the package management system (yum)Ĭreate a /etc//mongodb-org-5.0.repo file so that you can install MongoDB directly : sudo nano /etc//mongodb-org-5.0.repoĪnd add this below lines in this directory
#Install mongo shell download#
To install latest MongoDB and specific MongoDB visit MongoDB official download page connect to terminal How to Install MongoDB on Amazon Linux 2 Then in Use private key you need to give the path of your key pair that we have created. So you can see in this image firstly click on session then SSH then in Remote host paste the ip_address then in username you can specify only ec2-user for Amazon Linux 2. So now here im using MobaXterm to connect terminal so copy the ip_address of your instance connect to your terminal Then after click on launch there is pop up select an existing key pair or create a key pair so if have already a key pair then select a key pair otherwise create a key pair launch instance Step 7 : Here review once its correct or not then click on launch.

Step 6 : So here select “ Select an existing security group” then select “ default” conf security grp
#Install mongo shell full#
Step 5: Here you can give any meaning full name to your instance. Step 4: Here they give us 8 GiB free space. Here you can specify the number of instances you want. Step 2: Choose an Instance type so if you want another instance you can select as per your choice. Step 1: Go to Ec2 instance then click on launch instance then select Amazon Linux 2 launch instance AMI How to create Amazon Linux 2 EC2 Instance in AWS In this article we are going to cover How to Install MongoDB on Amazon Linux 2 and Connect MongoDB using compass.
