Skip to content

MongoDBni o'rnatish

MongoDBni Ubuntu operatsion tizimiga o'rnatishni ko'rib chiqamiz.

MongoDB Linuxga o'rnatish.

  • Linux paketlarini yangilaymiz.

    sudo apt update
    

  • gnupg ni linuxga o'rnatamiz. (gnupg haiqda shu havolaga o'tib bilib olishingiz mumkin. https://gnupg.org/index.html)

    sudo apt install gnupg
    

  • MongoDBni public GPG keyini tizimga qo'shamiz.

    wget -qO - https://www.mongodb.org/static/pgp/server-7.0.asc | sudo apt-key add - 
    

  • MongoDb uchun tizimdan list file yaratamiz.

    echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
    

  • Linux paketlarini yangilaymiz va mongosh bilan MongoDBni o'rnatamiz

    sudo apt update
    sudo apt install -y mongodb-org
    sudo apt install -y mongodb-mongosh
    

  • mongosh versiyasini tekshiramiz.

    mongosh --version 
    

  • mongoshdan chiqish

    exit
    

Windowsga o'rnatish quyidagi havolada berilgan.