#!/usr/bin/env bash wget "https://www.mongodb.org/static/pgp/server-6.0.asc" cat "server-6.0.asc" | gpg --dearmor -o /etc/apt/trusted.gpg.d/mongodb-6.gpg echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu $(lsb_release -cs)/mongodb-org/6.0 multiverse" | \ tee /etc/apt/sources.list.d/mongodb-org-6.0.list apt update && apt install mongodb-org -y systemctl restart mongod systemctl enable mongod