Not able to Install Mongo Db on AWS Linux 2023
Asked Answered
A

1

7

I'm trying to install mongodb in Amazon Linux with below configuration

NAME="Amazon Linux"
VERSION="2023"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2023"
PLATFORM_ID="platform:al2023"
PRETTY_NAME="Amazon Linux 2023"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2023"
HOME_URL="https://aws.amazon.com/linux/"
BUG_REPORT_URL="https://github.com/amazonlinux/amazon-linux-2023"
SUPPORT_END="2028-03-01"

I tried to install using Tarball and repo. However it got failed with below error


[root@ip ~]# mongod --version

mongod: /lib64/libcrypto.so.10: version `OPENSSL_1.0.2' not found (required by mongod)

mongod: /lib64/libcrypto.so.10: version `libcrypto.so.10' not found (required by mongod)

mongod: /lib64/libssl.so.10: version `libssl.so.10' not found (required by mongod)

[root@ip ~]# openssl version

OpenSSL 3.0.8 7 Feb 2023 (Library: OpenSSL 3.0.8 7 Feb 2023)

[root@i ~]#

tar -zxvf mongodb-linux-x86_64-amazon2-6.0.5.tgz
mongod version
Almaalmaata answered 22/3, 2023 at 13:54 Comment(2)
AWS have removed 1500 RPMs from AL2023 compared to what was in AL2. They've also standardised on openssl 3 which makes dragging in other RPMs more problematic. Of course AWS would prefer you to use their mongo service and their IPSEC service and their DNS service....Sporangium
This is an old question, but the Mongo documentation has been updated with instructions for Amazon Linux 2023. mongodb.com/docs/manual/tutorial/install-mongodb-on-amazonOffcolor
S
7

I got this working in AWS Linux 2023 (aka AL2023) by

edit /etc/yum.repos.d/mongodb-org-7.0.repo with the content:

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

Then install packages with yum install mongodb-org-database mongodb-org-database-tools-extra

You'll get a key prompt like this

Importing GPG key 0x1785BA38:
 Userid     : "MongoDB 7.0 Release Signing Key <[email protected]>"
 Fingerprint: E588 3020 1F7D D82C D808 AA84 160D 26BB 1785 BA38
 From       : https://www.mongodb.org/static/pgp/server-7.0.asc
Is this ok [y/N]: y

After that you'll have a new systemd service called mongod.service to treat as normal.


Now, some caveats:

Good luck !

Sporangium answered 5/4, 2023 at 4:53 Comment(1)
Mongo 7.0 appears to be available now. Earlier releases are listed but don't have the mongodb-org rpms. repo.mongodb.org/yum/amazon/2023/mongodb-org/7.0/x86_64/RPMSTree

© 2022 - 2024 — McMap. All rights reserved.