Skip to content

Wie man MongoDB auf AlmaLinux 9 installiert

Netcloud24
Cloud Infrastructure Expert
HOSTING H1

Free web hosting H1

5 GB of storage and SSL for a small website or WordPress project.

Explore hosting H1
WINDOWS VPS + RDS

Run Windows applications remotely

Windows Server 2022 or 2025 and RDS CALs included in the plan. Choose resources and user capacity for your business.

Explore Windows VPS
NetCloud24 Expert Guides Open the dedicated video page

Video transcript: NetCloud24 Expert Guides. Practical knowledge for a reliable cloud. Cloud and VPS expertise, security, performance, and step-by-step tutorials. Learn, deploy, and keep building with NetCloud24.

 

 

MongoDB ist eine NoSQL-Datenbank, die für ihre Flexibilität und Skalierbarkeit bekannt ist. In dieser Anleitung erfahren Sie, wie Sie MongoDB auf einem AlmaLinux 9-Server installieren.

Schritt 1: System aktualisieren

Bevor Sie mit der Installation von MongoDB beginnen, stellen Sie sicher, dass Ihr AlmaLinux 9-System auf dem neuesten Stand ist. Führen Sie dazu die folgenden Befehle aus:

        sudo dnf update -y
    

Schritt 2: MongoDB Repository hinzufügen

MongoDB ist nicht in den Standard-Repositories von AlmaLinux enthalten, daher müssen wir das offizielle MongoDB-Repository hinzufügen. Führen Sie den folgenden Befehl aus:

Visual overview of Wie man MongoDB auf AlmaLinux 9 installiert
Visual overview: Wie man MongoDB auf AlmaLinux 9 installiert
        sudo vi /etc/yum.repos.d/mongodb-org-6.0.repo
    

Fügen Sie dann die folgende Konfiguration in die Datei ein:

        [mongodb-org-6.0]
        name=MongoDB Repository
        baseurl=https://repo.mongodb.org/yum/amazon/2/mongodb-org/6.0/x86_64/
        gpgcheck=1
        enabled=1
        gpgkey=https://www.mongodb.org/static/pgp/server-6.0.asc
    

Schritt 3: MongoDB installieren

Nachdem das Repository hinzugefügt wurde, installieren Sie MongoDB mit folgendem Befehl:

        sudo dnf install -y mongodb-org
    

Schritt 4: MongoDB starten und aktivieren

Starten Sie den MongoDB-Dienst und aktivieren Sie ihn für den automatischen Start beim Booten:

        sudo systemctl start mongod
        sudo systemctl enable mongod
    

Überprüfen Sie, ob MongoDB ordnungsgemäß läuft:

        sudo systemctl status mongod
    

Schritt 5: Firewall konfigurieren

Falls Sie eine Firewall auf Ihrem AlmaLinux 9-Server verwenden, müssen Sie sicherstellen, dass der Standardport von MongoDB (27017) geöffnet ist. Führen Sie die folgenden Befehle aus:

Key topics covered in Wie man MongoDB auf AlmaLinux 9 installiert
Key topics covered in this NetCloud24 guide.
        sudo firewall-cmd --permanent --add-port=27017/tcp
        sudo firewall-cmd --reload
    

Schritt 6: MongoDB im Terminal testen

Um sicherzustellen, dass MongoDB korrekt installiert wurde, starten Sie das MongoDB-Shell-Interface:

        mongo
    

Wenn Sie erfolgreich verbunden sind, sehen Sie eine Eingabeaufforderung wie diese:

        MongoDB shell version v6.0.3
        connecting to: mongodb://127.0.0.1:27017
        Implicit session: session { "id" : UUID("...") }
        MongoDB server version: 6.0.3
    

VPS-Empfehlung

Wenn Sie nach einem zuverlässigen VPS suchen, besuchen Sie den folgenden Link für Windows VPS-Dienste: Windows VPS von NetCloud24.

Wie man MongoDB auf AlmaLinux 9 installiert
Wie man MongoDB auf AlmaLinux 9 installiert
Explore more

More on this topic

Netcloud24
Netcloud24
Cloud Infrastructure Expert · NetCloud24

Comments are closed.

Wie man MongoDB auf AlmaLinux 9 installiert

Netcloud24
Cloud Infrastructure Expert
HOSTING H1

Free web hosting H1

5 GB of storage and SSL for a small website or WordPress project.

Explore hosting H1
WINDOWS VPS + RDS

Run Windows applications remotely

Windows Server 2022 or 2025 and RDS CALs included in the plan. Choose resources and user capacity for your business.

Explore Windows VPS
NetCloud24 Expert Guides Open the dedicated video page

Video transcript: NetCloud24 Expert Guides. Practical knowledge for a reliable cloud. Cloud and VPS expertise, security, performance, and step-by-step tutorials. Learn, deploy, and keep building with NetCloud24.

Wie man MongoDB auf AlmaLinux 9 installiert
Wie man MongoDB auf AlmaLinux 9 installiert
Explore more

More on this topic

Netcloud24
Netcloud24
Cloud Infrastructure Expert · NetCloud24

Comments are closed.