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

image

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.
    [mongodb-org-4.4]
    name=MongoDB Repository
    baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.4/x86_64/
    gpgcheck=1
    enabled=1
    gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc

  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

2 Likes

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 Like
  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
[mongodb-org-4.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc
  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
    mongo

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

1 Like

Hello,

Just to add. I had the same issue and I use the instruction on the link StackExchange

Hi all,
Tried above steps of installation. Still facing below issue. Please check -

I had the exact same problems, and it all relates to the same issue: KodeKloud has a ton of out-of-date and poorly constructed labs in this section of the course. Every other lab is either completely broken because the instructions have you using out of date or missing website information, or they just don’t explain the task well enough for anyone to reasonably be able to perform it, especially in a “prerequisites” course. They desperately need to audit these lessons and update their materials.

1 Like