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.
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/

  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

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

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