Skip to content

Commit f7f48a8

Browse files
committedOct 4, 2024·
MongoDB 8 install script
1 parent e3fafbc commit f7f48a8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
 

‎bin/scripts/mongodb.install.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -341,12 +341,12 @@ if [ $# -eq 0 ]; then
341341
exit 1
342342
fi
343343

344-
echo "[mongodb-org-7.0]
344+
echo "[mongodb-org-8.0]
345345
name=MongoDB Repository
346-
baseurl=https://repo.mongodb.org/yum/redhat/${CENTOS_MAJOR}/mongodb-org/7.0/x86_64/
346+
baseurl=https://repo.mongodb.org/yum/redhat/${CENTOS_MAJOR}/mongodb-org/8.0/x86_64/
347347
gpgcheck=1
348348
enabled=1
349-
gpgkey=https://www.mongodb.org/static/pgp/server-7.0.asc" > /etc/yum.repos.d/mongodb-org-7.0.repo
349+
gpgkey=https://pgp.mongodb.com/server-8.0.asc" > /etc/yum.repos.d/mongodb-org-8.0.repo
350350

351351
yum install -y mongodb-org
352352
elif [ -f /etc/lsb-release ]; then
@@ -359,12 +359,12 @@ gpgkey=https://www.mongodb.org/static/pgp/server-7.0.asc" > /etc/yum.repos.d/mon
359359
exit 1
360360
fi
361361

362-
wget -qO - https://www.mongodb.org/static/pgp/server-7.0.asc | sudo apt-key add -
363-
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu ${UBUNTU_RELEASE}/mongodb-org/7.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-7.0.list ;
362+
curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-8.0.gpg --dearmor
363+
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/ubuntu ${UBUNTU_RELEASE}/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list
364364
apt-get update
365365
DEBIAN_FRONTEND="noninteractive" apt-get install -y mongodb-org || (echo "Failed to install mongodb." ; exit)
366366
else
367-
echo "Unsupported OS or version, only CentOS/RHEL 8 or 9 and Ubuntu 20 or 22."
367+
echo "Unsupported OS or version, only CentOS/RHEL 8 or 9 and Ubuntu 20 or 22 or 24."
368368
exit 1
369369
fi
370370

0 commit comments

Comments
 (0)
Please sign in to comment.