Labs - MongoDB - Q#6 Installing mongodb

Cant seem to install mongo. went to referred sites in hint - does not help. did the following:
ssh app01 - worked
sudo vi /etc/yum.repos.d/mongodb-org.4.4.repo - also tried without the vi
sudo yum install mongodb-org

Please provide exact commands


Hello, fifafd350
Thanks for reporting.

@fifafd350 could you try yum clean all and then yum repolist and see if mongodb repo is listed there ?

same for me. Exact as for player001

Hello, Ops-Nik
You can follow this, to install mongodb package.

  1. sudo vi /etc/yum.repos.d/mongodb-org-4.4.repo

  2. Copy below content in the above created repo.
    name=MongoDB Repository

  3. sudo yum clean all

  4. sudo yum repolist all

  5. sudo yum install mongodb-org -y

  6. sudo systemctl start mongod

  7. sudo systemctl daemon-reload

  8. sudo systemctl status mongod

1 Like

Still the commands provided does not work. Can you clearly list from the beginning exact steps and commands that need to be entered. finding instructions provided on-going are not clear. pls provide clear steps and exact commands to type. can not continue with rest of lab unless this step complete. it is slowing me down in progressing through course.

  1. ssh app01
  2. sudo vi /etc/yum.repos.d/mongodb-org-4.4.repo
  3. copy paste the below content in the /etc/yum.repos.d/mongodb-org-4.4.repo,
    Press i to insert, paste below data then Press ESC button and for save & exit do :wq
name=MongoDB Repository
  1. sudo yum clean all
  2. sudo yum repolist all --> It will list the repository which one is enabled or disabled
  3. sudo yum install mongodb-org -y
  4. sudo systemctl start mongod
  5. sudo systemctl daemon-reload
  6. sudo systemctl status mongod
  7. mongod --version

thank you so much. finally got it to work. appreciate you providing detailed commands