You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
548 B

apt install -y curl python3 python3-pip
curl -fsSL https://pgp.mongodb.com/server-7.0.asc | gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg --dearmor
export OS_VER=`cat /etc/os-release | grep VERSION_CODENAME` &&\
export OS_VER=${OS_VER#*=} &&\
printf "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu "${OS_VER}"/mongodb-org/7.0 multiverse\n">/etc/apt/sources.list.d/mongodb.list
apt update
apt install -y mongodb-org
mkdir -p /data/db
cd /data
python3 -m pip install pymongo