Skip to content

emka.web.id

menulis pengetahuan – merekam peradaban

Menu
  • Home
  • Tutorial
  • Search
Menu

Installing MongoDB Under Linux

Posted on January 7, 2012

The UNIX-based operating systems are extremely popular choices at the moment for hosting services, including web services, mail services, and, of course, database services. In this chapter, we’ll walk you through how to get MongoDB running on a popular Linux distribution: Ubuntu.

To make things simple (or perhaps more complicated, depending on your point of view), you have two ways of installing MongoDB under Ubuntu: you can install the packages automatically through socalled repositories, or you can install it manually. The next couple sections will walk you through both options.

Installing MongoDB Through the Repositories

Repositories are basically online directories filled with software. Every package contains information about the version number, prerequisites, and possible incompatibilities. This information is useful when you need to install a software package that requires another piece of software to be installed first because the prerequisites can be installed at the same time.

The default repositories available in Ubuntu (and other Debian-based distributions) contain MongoDB, but they may be out-of-date versions of the software. Therefore, let’s tell aptitude (the software you use to install software from repositories) to look at a custom repository. To do this, you need to add the following line to your repository-list (/etc/apt/sources.list):

deb http://downloads.mongodb.org/distros/ubuntu (version.number) 10gen

In the preceding line, version.number represents the distribution version. Let’s say your Ubuntu is version 10.4 (also called Ubuntu Lucid); in that case, the full line would look like this:

deb http://downloads.mongodb.org/distros/ubuntu 10.4 10gen

Next, you need to tell aptitude that it contains new repositories; you can do so using aptitude’s update command:

$ sudo aptitude update

The preceding line made aptitude aware of your manually added repository. This means you can now tell aptitude to install the software itself. You do this by typing the following command in the shell:

$sudo aptitude install mongodb-stable

As you may have guessed, the preceding line installs the current stable (production) version from MongoDB. If you wish to install the unstable (development) version from MongoDB, type in the following command instead:

$ sudo aptitude install mongodb-unstable

And this command installs the nightly build:

$ sudo aptitude install mongodb-snapshot

That’s all there is to it. At this point, MongoDB has been installed and is (almost) ready to use!

Installing MongoDB Manually

Next, we’ll cover how to install MongoDB manually. Given how easy it is to install MongoDB with aptitude automatically, you might wonder why you would want to install the software manually. For starters, not all Linux distributions use aptitude. Sure, a bunch of them do (including primarily the ones that are based on Debian Linux), but some don’t. Also, the packaging remains a work in progress, so it might be the case that there are versions not yet available through the repositories. It’s also possible that the version of MongoDB you want to use isn’t included in the repository (you might want to install an older version automatically). Installing the software manually also gives you the ability to run multiple versions of MongoDB at the same time.

Pages: 1 2

Terbaru

  • Inilah Alasan Raja Ampat Disebut Surga Terakhir di Bumi dengan Biodiversitas Laut Paling Gokil di Dunia
  • Inilah Tanggapan PKB Soal KPK Usul Syarat Capres Harus Kader Partai
  • Inilah 5 Calon Ketua DPC PKB Timor Tengah Selatan dan Perubahan Aturan Seleksi yang Perlu Kalian Perhatikan
  • Inilah 51 Kode Redeem FF Terbaru 29 April 2026, Ada Gintoki Bundle dan Skin Eksklusif!
  • Inilah Profil Abdul Kadir Karding, Politikus PKB yang Resmi Dilantik Menjadi Kepala Badan Karantina Nasional!
  • Inilah 36 Kode Redeem FC Mobile Terbaru Mei 2026, Ada Trik Rahasia Dapetin Pemain OVR 119 di Event TOTS!
  • Inilah iPhone Ultra, Bocoran Ponsel Lipat Pertama Apple dan MacBook Ultra Layar Sentuh yang Siap Mengguncang Pasar!
  • Inilah Bocoran Tanggal Rilis dan Gameplay EA Sports UFC 6 yang Paling Dinantikan
  • Inilah Arti Move WA dalam Bahasa Gaul yang Sering Muncul di Aplikasi Kencan dan Media Sosial
  • Inilah realme C100, Smartphone dengan Baterai Titan 8000mAh Pertama yang Garansi Awet Sampai 7 Tahun!
  • Inilah Cara Mengatasi Third Party Software Is Interfering With Roblox yang Sering Muncul Tiba-Tiba
  • Inilah Penyebab Data Seluler Tidak Bisa Digunakan Padahal Sudah Aktif dan Solusi Praktis Mengatasinya
  • Inilah Kenapa Canva Error 503 Tidak Bisa Dibuka Hari Ini dan Cara Mengatasinya Sampai Layanan Kembali Normal
  • Inilah Cerita Hangat di Balik Muscab PKB Kebumen: Dari Urusan Dapur Hingga Strategi Pemenangan 2029!
  • Inilah Kronologi dan Identitas 4 WNI yang Disandera Perompak Somalia di Kapal MT Honour 25
  • Inilah Alasan PKB Kaji Ulang Ambang Batas DPRD Biar Sejalan Sama Putusan MK
  • Inilah Jadwal Pengumuman Hasil TKA SD dan SMP 2026 dan Cara Cek Skor Kalian Secara Online
  • Inilah HP Gaming Vivo Terbaik 2026 yang Paling Gahar, Main Game Berat Nggak Pake Ngelag!
  • Inilah Potensi Pajak Selat Malaka yang Bikin Rame, Ternyata Gini Cara Mainnya Biar Nggak Melanggar Hukum Internasional
  • Inilah Alasan Kenapa Sinkhole Sering Muncul di Indonesia dan Cara Mengenali Tanda-Tandanya Supaya Kalian Tetap Aman
  • Inilah Program PJJ 2026 untuk Anak Tidak Sekolah, Cara Mudah Masuk SMA Tanpa Harus ke Kelas Tiap Hari!
  • Inilah Program SPMB 2026 PJJ Khusus Anak Tidak Sekolah, Solusi Buat yang Pengen Balik Belajar!
  • Inilah Cara Kuliah di Al-Azhar Mesir Lewat Jalur Kemenag 2026, Lengkap dengan Syarat dan Jadwalnya!
  • Inilah Jadwal Lengkap Jalur Mandiri Unud 2026, Persiapkan Diri Kalian Sebelum Menyesal!
  • Inilah 8 Universitas Swasta Terbaik di Indonesia Versi THE Asia University Rankings 2026 yang Bisa Jadi Pilihan Kuliah Kamu
  • Inilah Jadwal Terbaru SSU ITB 2026 yang Diperpanjang, Lengkap dengan Syarat dan Rincian Biayanya!
  • Inilah 10 Jurusan Kuliah Paling Dicari Perusahaan Tahun 2026, Cek Daftarnya Biar Nggak Salah Pilih!
  • Inilah Cara Daftar Beasiswa Tut Wuri Handayani 2026, Kesempatan Emas Buat PNS Kemendiktisaintek Tingkatkan Karier!
  • Inilah Ketentuan Lengkap TKA Susulan 2026 SD dan SMP, Cek Syarat dan Jadwal Resminya Di Sini!
  • Inilah Kurikulum Berbasis Cinta Madrasah: Panduan Lengkap dan Link Download PDF Terbaru 2026
  • How to Build Real-Time Personalization Systems Using AWS Agentic AI to Make Every User Feel Special
  • How to Transform Your Windows 11 Interface into a Sleek and Modern Aesthetic Masterpiece
  • How to Understand Google’s New TPU 8 Series for Massive AI Training and Inference
  • How to Level Up Your PC Gaming Experience with the New Valve Steam Controller and Its Advanced Features
  • Is it Time to Replace Nano? Discover Fresh, the Terminal Text Editor You Actually Want to Use
  • How to Create Professional Movies and Advertisements Automatically Using the 50 Plus Artificial Intelligence Models in Studio by Abacus AI
  • How to use ChatGPT Images 2.0 to transform your creative ideas into professional visual assets
  • How to Use Dreamina SeaDance 2.0 to Create Professional Motion Graphics and Viral Videos Like a Pro
  • How to Automate Your Daily Digital Chores Using the Powerful Combination of Claude Co-work and Ollama
  • How to access over 500 AI models and build professional automation workflows using WaveSpeed Desktop for free
  • Apa itu Spear-Phishing via npm? Ini Pengertian dan Cara Kerjanya yang Makin Licin
  • Apa Itu Predator Spyware? Ini Pengertian dan Kontroversi Penghapusan Sanksinya
  • Mengenal Apa itu TONESHELL: Backdoor Berbahaya dari Kelompok Mustang Panda
  • Siapa itu Kelompok Hacker Silver Fox?
  • Apa itu CVE-2025-52691 SmarterMail? Celah Keamanan Paling Berbahaya Tahun 2025

©2026 emka.web.id | Design: Newspaperly WordPress Theme