ubuntu-2204-graylog/0020-install-mongodb.sh

13 lines
416 B
Bash
Raw Permalink Normal View History

2024-01-08 00:30:05 +02:00
#!/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
2024-01-08 00:49:41 +02:00
systemctl restart mongod
2024-01-08 00:30:05 +02:00
systemctl enable mongod