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 HP Nokia Jadul Harganya Masih Selangit dan Banyak Diburu Kolektor di Tahun 2026
  • Inilah HP Samsung A Series Terbaru yang Pakai Layar AMOLED, Mewah Tapi Harganya Terjangkau Banget!
  • Inilah Vivo T5 Pro, HP Midrange dengan Baterai 9.020 mAh yang Siap Comeback ke Indonesia!
  • Inilah Cara Daftar Manajer Koperasi Desa Merah Putih 2026, Ada 30.000 Formasi yang Bisa Kalian Lamar!
  • Inilah Alasan Kenapa Kemkomdigi Ancam Blokir Wikipedia dan Dampak Seriusnya Buat Masa Depan Pendidikan Kita
  • Inilah Cara Cek BLT Desa 2026 Tahap 2, Cair Rp900 Ribu Langsung ke Tangan Kalian!
  • Inilah Cara Cek PIP Lewat HP 2026 dan Panduan Lengkap Pencairannya Biar Dana Nggak Hangus
  • Inilah 51 Kode Redeem FF Aktif 17 April 2026, Buruan Klaim Skin Blue Angelic dan Bundle Langka!
  • Inilah Huawei Mate 80 Pro, Sang Legenda Flagship yang Kembali dengan Kamera True-to-Colour dan Ketahanan Luar Biasa
  • Inilah Deretan iPhone Terlawas yang Masih Layak Dibeli Tahun 2026, Performa Tetap Ngebut dan Harga Terjangkau!
  • Inilah HP Oppo Paling Worth It di Tahun 2026, Spesifikasi Gahar Tapi Harga Tetap Merakyat!
  • Inilah Daftar Link Nonton Film Ilegal yang Diblokir Komdigi dan Alasan Kenapa Kalian Harus Waspada
  • Inilah Lenovo Legion Y70 (2026), HP Gaming yang Siap Guncang Pasar dengan Teknologi AI
  • Inilah Rekomendasi HP Oppo Murah Spek Mewah Tahun 2026 yang Nggak Bakal Bikin Kantong Kalian Jebol!
  • Inilah 15 Situs Nonton Film Gratis Legal 2026, Bye-Bye Iklan Ganggu dan Drama Situs Ilegal!
  • Inilah Beasiswa Bekraf Digital Talent 2026: Solusi Buat Kalian yang Mau Jago AI dan Makin Produktif
  • Inilah Cara Memilih Power Bank yang Aman Dibawa ke Pesawat Agar Tidak Disita Petugas
  • Inilah Bocoran Harga dan Spesifikasi Redmi K90 Max, HP Gaming Dimensity 9500 Termurah yang Segera Dirilis!
  • Inilah RedMagic Gaming Tablet 5 Pro, Monster Gaming dengan Layar 185Hz dan Chipset Snapdragon 8 Elite yang Bikin Melongo!
  • Inilah Kenapa IGRS Trending di X, Bocorkan Spoiler Penting Game 007 First Light Hingga Ending!
  • Inilah 5 HP Murah Terbaru dengan Baterai Jumbo yang Siap Masuk Indonesia 2026, Ada yang Sampai 7.800 mAh!
  • Inilah Alasan Kenapa Samsung Galaxy S27 Bakal Pakai 50 Persen Chipset Exynos, Qualcomm Mulai Ditinggalkan?
  • Inilah Vivo Y31d Pro, Smartphone “Badak” dengan Baterai 7000mAh dan Ketahanan Standar Militer
  • Inilah 11 Game Penghasil Saldo DANA Tercepat 2026, Cara Asyik Cari Cuan Sambil Rebahan!
  • Inilah Motorola Edge 70 Pro, HP Midrange Gahar dengan Baterai 6500 mAh yang Siap Meluncur!
  • Inilah Kode Redeem FF Max 15 April 2026, Buru Skin Undersea Splatter dan Item Eksklusif Bawah Laut Sekarang!
  • Inilah Bocoran Vivo X500 Series dan Kamera Vlogging Saku yang Bakal Bikin DJI Ketar-ketir!
  • Inilah 6 Rekomendasi HP Gaming Paling Murah April 2026, Main Game Berat Nggak Pake Lag!
  • Inilah Caranya Manfaatin SPayLater di Aplikasi ShopeePay Biar Keuangan Tetap Aman Saat Tanggal Tua
  • Inilah Perbedaan Durasi Reels IG dan FB Terbaru 2026, Ternyata Bisa Sampai 20 Menit Lho!
  • 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 the Wan 2.7 AI model: A complete walkthrough
  • How to Run Minimax M2-7 Locally: A Step-by-Step Guide for Beginners
  • How to Build Self-Driving Codebases with Async Agents and NVIDIA Hardware
  • How to create a professional AI influencer using Apob AI
  • How to Use AI-Powered Tools to Level Up Your Stock Market Research Game with Claude Code
  • New Text Document
  • 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?

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