1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-02-01 17:31:49 +00:00

MongoDB 8.0

This commit is contained in:
CanbiZ 2024-12-27 20:00:58 +01:00 committed by GitHub
parent 9cd79e24bd
commit d9eb122650
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,14 +20,22 @@ $STD apt-get install -y sudo
$STD apt-get install -y mc
msg_ok "Installed Dependencies"
msg_info "Installing MongoDB"
wget -qO- https://www.mongodb.org/static/pgp/server-7.0.asc | gpg --dearmor >/usr/share/keyrings/mongodb-server-7.0.gpg
echo "deb [signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg] http://repo.mongodb.org/apt/debian $(grep '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2)/mongodb-org/7.0 main" >/etc/apt/sources.list.d/mongodb-org-7.0.list
# Abfrage für die MongoDB-Version
read -p "Do you want to install MongoDB 8.0 instead of 7.0? [y/N]: " install_mongodb_8
if [[ "$install_mongodb_8" =~ ^[Yy]$ ]]; then
MONGODB_VERSION="8.0"
else
MONGODB_VERSION="7.0"
fi
msg_info "Installing MongoDB $MONGODB_VERSION"
wget -qO- https://www.mongodb.org/static/pgp/server-${MONGODB_VERSION}.asc | gpg --dearmor >/usr/share/keyrings/mongodb-server-${MONGODB_VERSION}.gpg
echo "deb [signed-by=/usr/share/keyrings/mongodb-server-${MONGODB_VERSION}.gpg] http://repo.mongodb.org/apt/debian $(grep '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2)/mongodb-org/${MONGODB_VERSION} main" >/etc/apt/sources.list.d/mongodb-org-${MONGODB_VERSION}.list
$STD apt-get update
$STD apt-get install -y mongodb-org
sed -i 's/bindIp: 127.0.0.1/bindIp: 0.0.0.0/' /etc/mongod.conf
systemctl enable -q --now mongod.service
msg_ok "Installed MongoDB"
msg_ok "Installed MongoDB $MONGODB_VERSION"
motd_ssh
customize