I am trying to install Mongo version 3.6 on CentOS, but the installation consistently fails with the following error:
`https://repo.mongodb.org/yum/redhat//mongodb-org/3.6/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
failure: repodata/repomd.xml from mongodb-org-3.6: [Errno 256] No more mirrors to try.
https://repo.mongodb.org/yum/redhat//mongodb-org/3.6/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found`
Here's the content of the repo file that I am using. I have copied this from the MongoDB website:
`[mongodb-org-3.6]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat//mongodb-org/3.6/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.6.asc`
I have looked up on many forums, but I could not find a resolution to this issue. Could you help with the installation? Let me know what I am doing wrong?
Create a /etc/yum.repos.d/mongodb-org-3.6.repo
file so that you can install MongoDB directly using yum
:
Use the following repository file:
[mongodb-org-3.6] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.6/x86_64/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-3.6.asc
Install the MongoDB packages with the following command:
sudo yum install -y mongodb-org
or
sudo yum install -y mongodb-org-3.6.17 mongodb-org-server-3.6.17 mongodb-org-shell-3.6.17 mongodb-org-mongos-3.6.17 mongodb-org-tools-3.6.17
通过指示 CentOS 7 来更改您的 url:
https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.6/x86_64/
wget https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.6/x86_64/RPMS/mongodb-org-server-3.6.17-1.el7.x86_64.rpm
sudo rpm -i mongodb-org-server-3.6.17-1.el7.x86_64.rpm
sudo systemctl start mongod
INSTALL ADDITIONAL COMPONENTS
# SHELL
wget https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.6/x86_64/RPMS/mongodb-org-shell-3.6.17-1.el7.x86_64.rpm
sudo rpm -i mongodb-org-shell-3.6.17-1.el7.x86_64.rpm
# MONGOS
wget https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.6/x86_64/RPMS/mongodb-org-mongos-3.6.17-1.el7.x86_64.rpm
sudo rpm -i mongodb-org-mongos-3.6.17-1.el7.x86_64.rpm
# TOOLS
wget https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.6/x86_64/RPMS/mongodb-org-tools-3.6.17-1.el7.x86_64.rpm
sudo rpm -i mongodb-org-tools-3.6.17-1.el7.x86_64.rpm
# REMAINING BITS
wget https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.6/x86_64/RPMS/mongodb-org-3.6.17-1.el7.x86_64.rpm
sudo rpm -i mongodb-org-3.6.17-1.el7.x86_64.rpm
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.