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 Rekomendasi Smartwatch Mirip Apple Watch Termurah 2026 yang Bikin Gaya Makin Maksimal
  • Inilah Cara Cek Lokasi UTBK 2026 Agar Tidak Salah Alamat dan Terlambat
  • Inilah Realme Narzo 100 Lite 5G, Smartphone Baterai 7000mAh yang Siap Meluncur dengan Spesifikasi Gahar dan Layar Super Smooth
  • Inilah Alasan Kenapa Aplikasi MOVA Berbahaya dan Bukan Cara Cepat Kaya yang Aman
  • Inilah Huawei Watch GT Runner 2, Smartwatch Keren yang Siap Bikin Lari Kalian Makin Kencang dan Presisi!
  • Inilah Panduan Lengkap Mengunduh dan Mencetak Kartu Peserta UTBK 2026 Biar Nggak Salah Langkah
  • Apa itu Satgas PKH? Tim Khusus yang Bakal Sikat Penguasaan Hutan Ilegal di Indonesia
  • Inilah REDMI Pad 2 SE, Tablet Murah dengan Layar 2K yang Siap Bikin Nyaman Mata Kalian
  • Apa itu msgstore.db.crypt14 di WhatsApp? Jangan Asal Hapus Kalau Nggak Mau Chat Hilang!
  • Inilah Fakta di Balik Kasus Siswi 15 Tahun di Langkat yang Viral Jadi Tersangka Usai Bela Ayahnya
  • Inilah 7 HP Redmi Kamera Terbaik 2026 dengan Resolusi 200 MP, Kualitas Flagship Harga Tetap Irit!
  • Inilah Bahaya dan Cara Kerja Unlock FF Beta Server Account Apk Mobilitado yang Lagi Viral
  • Inilah 5 Laptop Lenovo Paling Awet dan Tangguh Buat Investasi Jangka Panjang Kalian
  • Inilah Kronologi Tragis Mahasiswa PNP Padang Ditemukan Meninggal di Kamar Kos 11 April 2026
  • Inilah Kenapa Akun WhatsApp Kalian Sedang Ditinjau dan Cara Mengatasinya Biar Normal Lagi
  • Inilah Kronologi Gadis Lampung Nekat Menyamar Jadi Pria Demi Lamar Kekasih di Sinjai yang Berujung Urusan Polisi
  • Inilah Kronologi Kecelakaan Beruntun Jalur Purworejo-Magelang 11 April 2026: Berawal Dari Rem Mendadak Karena Kucing Melintas
  • Inilah Kabar Mengejutkan OTT KPK Bupati Tulungagung Gatut Sunu Wibowo, Begini Kronologi dan Profil Lengkapnya
  • Inilah Mod HUD Minecraft 2026 yang Bikin Tampilan Game Kalian Makin Keren dan Informatif
  • Inilah Panduan Lengkap UM-PTKIN 2026: Jadwal, Cara Daftar, dan Tips Strategis Memilih Jurusan di UIN IAIN STAIN
  • Inilah Alasan Kenapa Tiny House di Sleman Makin Populer dan Cara Bangunnya dengan Budget 100 Jutaan
  • Inilah Alasan Kenapa Akun Instagram Wapres Gibran Sempat Follow Akun Judi Online, Ternyata Begini Faktanya!
  • Inilah Kronologi Lengkap Kasus Dugaan Penistaan Agama Injak Alquran di Lebak Banten yang Lagi Viral
  • Inilah Rekomendasi Instagram Downloader Terbaik 2026, Cara Download Reels dan Foto Paling Sat Set!
  • Inilah Alasan Kenapa Channel YouTube Kalian Gak Berkembang Meskipun Kontennya Udah Bagus
  • Inilah Cara Buka Situs yang Diblokir di Tahun 2026, Trik Rahasia Tanpa VPN!
  • Inilah Cara Menghilangkan Iklan di HP Xiaomi dan POCO Paling Ampuh Tanpa Root, Update April 2026
  • Inilah 7 Rekomendasi HP 1 Jutaan Terbaik yang Layak Kalian Lirik, Speknya Nggak Kaleng-Kaleng!
  • Inilah 7 Cara Mengembalikan Foto yang Terhapus Permanen di HP, Ternyata Masih Bisa Diselamatkan!
  • Inilah Cara Mengatasi Baterai Boros Setelah Update HyperOS yang Paling Ampuh
  • Is it Time to Replace Nano? Discover Fresh, the Terminal Text Editor You Actually Want to Use
  • How to Design a Services Like Google Ads
  • How to Fix 0x800ccc0b Outlook Error: Step-by-Step Guide for Beginners
  • How to Fix NVIDIA App Error on Windows 11: Simple Guide
  • How to Fix Excel Formula Errors: Quick Fixes for #NAME
  • How to Use VoxCPM2: The Complete Tutorial for Professional Voice Cloning and AI Speech Generation
  • Complete tutorial for Creao AI: How to build smart AI agents that automate your daily tasks
  • How to Streamline Your Digital Workflow with TeraBox AI: A Complete Tutorial for Beginners
  • How to Run Google Gemma 4 Locally: A Beginner’s Guide to Tiny but Mighty AI Models
  • A Beginner Tutorial on Cloning Website Source Code Using ChatGPT and AI Logic Reconstruction
  • 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