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 45 Planet Berbatu yang Paling Berpotensi Jadi Rumah Kedua Manusia di Masa Depan
  • Inilah Cara Ambil Kursus Online Gratis dari Harvard University untuk Asah Skill Digital Kalian!
  • Inilah Rincian UKT UGM 2026 Jalur SNBP dan SNBT, Calon Mahasiswa Wajib Tahu!
  • Inilah Daftar 25 Universitas Terbaik di Inggris 2026 Versi The Guardian yang Wajib Kalian Lirik!
  • Inilah Alasan University of Oxford Masih Jadi Juara Dunia di QS Rankings 2026, Empat Jurusan Ini Nggak Ada Lawannya!
  • Inilah 17 Rahasia Tips Sukses dari Produk Digital, Yuk Simak!
  • Inilah Peluang Lolos SNBT Unair 2026, Cek Keketatan Jurusan Pilihanmu Sekarang!
  • Hapus PR! China Baru Saja Rombak Aturan Sekolah, Inilah Caranya Mereka Ngurangin Beban Stres Siswa
  • Inilah Daftar Negara Paling Sopan di Dunia, Ternyata Jepang Juaranya Bukan Eropa!
  • Inilah Alasan Kenapa Ada Gurun yang Letaknya Malah di Pinggir Laut, Kok Bisa?
  • Inilah Cara Mengajukan bluExtraCash BCA Digital, Pinjaman Online Tanpa Agunan yang Bisa Cair Kilat Sampai 50 Juta
  • Inilah Cara Mengisi Berita Acara Pengecekan Penyimpanan Eksternal Bantuan Pemerintah Lewat CrystalDiskInfo, Gampang Banget!
  • Belum Tahu? Inilah Cara Pasang FF Kipas Org OB52 Apk Biar Nggak Mentok Logo dan Bisa Jadi Sultan!
  • Belum Tahu? Inilah FF Kipas Custom Free 32 Bit APK, Solusi Lag atau Malah Bikin Masalah?
  • Inilah Daftar Kode Redeem Blox Fruits Terbaru dan Cara Pakainya Biar Cepat Level Max!
  • Ini Trik Supaya YouTube Shorts Kalian Ranking 1 di Pencarian
  • Inilah Daftar Kode Redeem Fish It Roblox Terbaru April 2026 dan Cara Klaimnya Biar Mancing Makin Gacor!
  • Inilah Cara Tarik Saldo Cool Lady, Game Penghasil Uang yang Lagi Viral dan Terbukti Membayar!
  • Inilah Kode Redeem Drag Drive Simulator April 2026, Simak Trik Rahasia Biar Menang Balapan Terus!
  • Inilah Little Finder Guy, Strategi Unik Apple yang Bikin MacBook Neo Jadi Viral di Media Sosial
  • Inilah Yang Baru di Minecraft Java Edition 26.1.1, Perubahan Mob Bayi Jadi Lebih Realistis dan Fitur Baru yang Bikin Gameplay Makin Seru!
  • Inilah Cara Bayar UKT UIN Sunan Kalijaga 2026 Lewat Kode Bayar Biar Nggak Bingung Lagi!
  • Inilah Syarat Penting Surat Keterangan Kelas 12 UTBK 2026 dan Contohnya
  • Belum Tahu? Inilah Cara Bayar UTBK SNBT 2026 Online Biar Nggak Ketinggalan Jadwal!
  • Inilah Kebenaran Kasus Bayu, Siswa yang Viral Katanya Dilengserkan dari Ketua OSIS Gegara Kritik Makan Bergizi Gratis
  • Inilah 4 Cara Jitu Jualan Produk Digital Pakai Google, Dijamin Cuan Terus!
  • Inilah Sinopsis dan Jadwal Tayang Drakor Perfect Crown, Kisah Pernikahan Kontrak IU dan Byun Woo-seok yang Menarik untuk Disimak!
  • Inilah Rekomendasi Game Tata Kota Terbaik di Linux yang Seru Banget Buat Dimainkan
  • Inilah Cara Dapat Saldo Cool Lady Tanpa Undang Teman, Ternyata Begini Trik Rahasianya!
  • Inilah Cara Main Watermelon Merge Fun Biar Dapat Saldo DANA, Apakah Benaran Membayar?
  • 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 Master NemoClaw and OpenShell for a Protected Virtual Assistant Experience
  • How to Create Realistic AI Influencer Video with LTXVideo and ComfyUI (Workflows + Tools)
  • How to Master Google Flow and Create Stunning AI Videos Like a Pro!
  • How to Make Your Study Material with Google’s NotebookLM: New AI Quizzes and Flashcards Explained
  • How to Solving OpenClaw Memory Issues with MemPalace!
  • 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