Setting Up MongoDB

mongodb

#46

Hi dears.
I faced with the same problem.
Did you find reason and solved it?
image


#47

Also problem with installing sudo:


#48

Can you follow the instructions here to install mongodb-org on Amazon Linux? The problem you’re experiencing is that mongodb-org isn’t in the default repos for Amazon Linux, so you have to manually add their own package repos, and then use sudo yum install -y mongodb-org.


#49

Hi Danny,
Thanks for your useful feedback. Successfully installed "sudo yum install -y mongodb-org"
But during running “./mongod” there is error:


#50

Hey Danny, beginner here. I’m trying to follow the steps on the link but I’m a bit confused by what I exactly have to do when creating the /etc/yum.repos.d/mongodb-org-3.6.repo file. Do I create a file inside a certain directory and leave the contents of it blank?

Also, what do I do with

[mongodb-org-3.6]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/amazon/2013.03/mongodb-org/3.6/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.6.asc

Thank you


#51

guys, I spent to install mongodb 5hours, and no one said that it should be installed in yum which different than the the files on the left side in cloud9 ide. what I did.

  1. $ sudo yum-config-manager --add-repo /etc/yum.repos.d/mongodb-org-3.6.repo - copy this to the terminal.
  2. $ sudo yum-config-manager --enable epel (try first without this step)

3.First enter this to the terminal $ sudo vi /etc/yum.repos.d/mongodb-org-3.6.repo - then need to enter the text into terminal : [mongodb-org-3.6]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/amazon/2013.03/mongodb-org/3.6/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.6.asc

  1. when the text above appears in the terminal press Esc then need to enter :wq (colon +wq) to save the changed file

  2. Now need to install mongodb : $ sudo yum install -y mongodb-org

  3. if you will have error that mongodb conflicts with earlier version or something like this then you need to delete the the pkg with what it conflicts by : ** $ sudo yum remove **

  4. Then go to https://docs.mongodb.com/manual/tutorial/install-mongodb-on-amazon/#configure-the-package-management-system-yum and continue from the step Run MongoDB Community Edition ($ sudo service mongod start).


#52

Great effort… thanks…


#53

Having the same issue, for some reason it won’t find the package mongodb-org.

If I just run yum install -y mongodb it installs;

But then the ./mongod command won’t work…