Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

How to setup MongoDB Database in your AWS EC2 Instance |

Автор: Project DevOps

Загружено: 2025-01-30

Просмотров: 314

Описание:

Hello and welcome to the new video of How Tos series. In this video i have explained How to setup MongoDB Database in your AWS EC2 Instance.

I have uploaded the notes here at : https://github.com/projectdevops709/m...

Commands At : https://github.com/projectdevops709/m...

Commands Used for setup :
import the public key
sudo apt-get install gnupg curl

curl the gpg key for the mongoDB
curl -fsSL https://www.mongodb.org/static/pgp/se... | \
sudo gpg -o /usr/share/keyrings/mongodb-server-8.0.gpg \
--dearmor

create a list file for the mongoDB
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/ubuntu noble/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list

reload the local package database
sudo apt-get update

install the stable version of the mongodb
sudo apt-get install -y mongodb-org

start the mongod service
sudo systemctl start mongod

if service not found, run the deamon once again
sudo systemctl daemon-reload

verify the mongodb started successfully
sudo systemctl status mongod

if you want mongodb to be re-start when the system is booted
sudo systemctl enable mongod

here you have installed the MongoDB database in your EC2 instance, now we will configure it for out database uses
please note that the below mentioned practice is not suggested for your production enviroment, you will have to use string authentication and RBAC techniquies for production environments.

in the same instance connect to the mongo-db shell
mongosh

switch to admin database
use admin

use the following command to add an admin user with your desired password
db.createUser({user: "admin", pwd: "admin", roles: [{ role: "root", db: "admin" }]})

you can also update your user by using below command
db.updateUser("admin", {pwd: "admin", roles: [{ role: "root", db: "admin" }]})

exit the mongodb shell
exit

now we will enable the mongodb authentication by adding some changes in the mongodb config file

open the mongodb config file
sudo nano /etc/mongod.conf

add the following code or replace with the previous added code, only change thes blocks, and leave the rest of the congiguration as it is.

security:
authorization: "enabled"

change the bindip from 127.0.0.1 to 0.0.0.0
net:
port: 27017
bindIp: 0.0.0.0 # Allow connections from any IP


save and exit the configuration
restart the mongodb servcice to perform the changes
sudo systemctl restart mongod

You can use mongoDB compass to get connected with your live mongodb database by using the below URI.
MONGO_URI=mongodb://admin:[email protected]:27017/?authSource=admin

I have been into the DevOps profile from last 4 years and i will be sharing my practical experience, please let me know whatever you want to suggest in comment section, as we all are humans, and I am expecting the same, hates & like as well. The content will be much clear, and I will try to keep it clean as much as I can, also I would like to express thanks to everyone who is watching my video.

#Docker #kubernetes #devops #gitops #argocd #python #linux #githubactions #jenkinstutorial #jenkinspipeline #howto #aws #cloudcomputing #mongodb | #mongodbtutorialforbeginners

Disclaimer - Logos used in the thumbnail and in the whole video content is used for tutorial and learning purposes, their commercial and ownership rights belong to their owners and creators.

How to setup MongoDB Database in your AWS EC2 Instance |

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

array(10) { [0]=> object(stdClass)#5495 (5) { ["video_id"]=> int(9999999) ["related_video_id"]=> string(11) "03oR-xcNfQQ" ["related_video_title"]=> string(94) "How to create Free Tier AWS Account | AWS Free Account | AWS Free Tier Limit | Cloud Computing" ["posted_time"]=> string(25) "4 месяца назад" ["channelName"]=> string(14) "Project DevOps" } [1]=> object(stdClass)#5468 (5) { ["video_id"]=> int(9999999) ["related_video_id"]=> string(11) "gChzfhVGqp8" ["related_video_title"]=> string(62) "Setup MongoDB for Production deployment - Replica Sets cluster" ["posted_time"]=> string(21) "4 года назад" ["channelName"]=> string(11) "Mafia Codes" } [2]=> object(stdClass)#5493 (5) { ["video_id"]=> int(9999999) ["related_video_id"]=> string(11) "blWdjRUPP6E" ["related_video_title"]=> string(72) "Разведчик о том, как использовать людей" ["posted_time"]=> string(25) "3 недели назад" ["channelName"]=> string(18) "Коллектив" } [3]=> object(stdClass)#5500 (5) { ["video_id"]=> int(9999999) ["related_video_id"]=> string(11) "Gz_7WMjv6sE" ["related_video_title"]=> string(77) "AWS EC2 Instance Setup and Run MongoDB in EC2 | Install MongoDB in EC2 Server" ["posted_time"]=> string(21) "2 года назад" ["channelName"]=> string(13) "codeonedigest" } [4]=> object(stdClass)#5479 (5) { ["video_id"]=> int(9999999) ["related_video_id"]=> string(11) "tz0fzaIE5Pk" ["related_video_title"]=> string(119) "Собираю AI-Агента с RAG в N8N — работает как человек (шаблон внутри)" ["posted_time"]=> string(25) "2 недели назад" ["channelName"]=> string(6) "Kireev" } [5]=> object(stdClass)#5497 (5) { ["video_id"]=> int(9999999) ["related_video_id"]=> string(11) "9Ae-Vc6YkxU" ["related_video_title"]=> string(80) "Скотт Риттер: Громкое фиаско Трампа в Иране?" ["posted_time"]=> string(21) "4 часа назад" ["channelName"]=> string(16) "Stewart Mitchell" } [6]=> object(stdClass)#5492 (5) { ["video_id"]=> int(9999999) ["related_video_id"]=> string(11) "Phg2ezNp-v0" ["related_video_title"]=> string(64) "Highly Scalable Backend with AWS + MongoDB [Architecture video]" ["posted_time"]=> string(21) "3 года назад" ["channelName"]=> string(16) "Mehul - Codedamn" } [7]=> object(stdClass)#5502 (5) { ["video_id"]=> int(9999999) ["related_video_id"]=> string(11) "pFKwmEdwZZQ" ["related_video_title"]=> string(78) "CI/CD — Простым языком на понятном примере" ["posted_time"]=> string(27) "8 месяцев назад" ["channelName"]=> string(25) "Артём Шумейко" } [8]=> object(stdClass)#5478 (5) { ["video_id"]=> int(9999999) ["related_video_id"]=> string(11) "QUbLG1oVu5k" ["related_video_title"]=> string(116) "ПОЛОВИНА ИЗРАИЛЯ РАЗРУШЕНА! Ракета "Саджиль" упала на Тель-Авив!" ["posted_time"]=> string(24) "10 часов назад" ["channelName"]=> string(36) "Мудрость в историях" } [9]=> object(stdClass)#5496 (5) { ["video_id"]=> int(9999999) ["related_video_id"]=> string(11) "RyRq1IJU-sg" ["related_video_title"]=> string(46) "Америка вступает в войну." ["posted_time"]=> string(23) "5 часов назад" ["channelName"]=> string(12) "Mark Solonin" } }
How to create Free Tier AWS Account | AWS Free Account | AWS Free Tier Limit | Cloud Computing

How to create Free Tier AWS Account | AWS Free Account | AWS Free Tier Limit | Cloud Computing

Setup MongoDB for Production deployment - Replica Sets cluster

Setup MongoDB for Production deployment - Replica Sets cluster

Разведчик о том, как использовать людей

Разведчик о том, как использовать людей

AWS EC2 Instance Setup and Run MongoDB in EC2 | Install MongoDB in EC2 Server

AWS EC2 Instance Setup and Run MongoDB in EC2 | Install MongoDB in EC2 Server

Собираю AI-Агента с RAG в N8N — работает как человек (шаблон внутри)

Собираю AI-Агента с RAG в N8N — работает как человек (шаблон внутри)

Скотт Риттер: Громкое фиаско Трампа в Иране?

Скотт Риттер: Громкое фиаско Трампа в Иране?

Highly Scalable Backend with AWS  + MongoDB [Architecture video]

Highly Scalable Backend with AWS + MongoDB [Architecture video]

CI/CD — Простым языком на понятном примере

CI/CD — Простым языком на понятном примере

ПОЛОВИНА ИЗРАИЛЯ РАЗРУШЕНА! Ракета

ПОЛОВИНА ИЗРАИЛЯ РАЗРУШЕНА! Ракета "Саджиль" упала на Тель-Авив!

Америка вступает в войну.

Америка вступает в войну.

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]