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 10 Jurusan Terfavorit di Universitas Negeri Semarang Buat SNBT 2026, Saingannya Ketat Banget!
  • Belum Tahu? Inilah Cara Mudah Membuat Akun dan Login EMIS GTK IMP 2026 yang Benar!
  • Cara Dapat Kode Kartu Hadiah Netflix Gratis Tanpa Ribet
  • Inilah Caranya Dapet Bukti Setor Zakat Resmi dari NU-Care LazisNU Buat Potong Pajak di Coretax!
  • Inilah 10 Jurusan Terfavorit di Universitas Brawijaya Buat SNBT 2026, Saingannya Ketat Banget!
  • Inilah Cara Terbaru Login dan Ubah Password Akun PTK di EMIS GTK IMP 2026
  • Inilah Batas Maksimal Zakat untuk Pengurang Pajak, Ternyata Begini Aturannya!
  • Inilah Cara Mengenali Aplikasi Bodong Penghasil Uang Agar Kalian Nggak Jadi Korban Penipuan Digital
  • Apa itu Error Kode LADK3 saat Buka Rekening Brimo? Dan Solusinya!
  • BOHONG??? Inilah Rincian Anggaran Makan Bergizi Gratis, Ternyata Uang Bahan Makanannya Nggak Sampai Rp15.000!
  • Inilah Tugas Proktor Ujian TKA SD/SMP 2026, Baca Dulu Ada Yang Beda!
  • Tips Pajak Coretax: Inilah Cara Memastikan Lembaga Amil Zakat yang Sah Agar Pajak Kalian Berkurang!
  • Kenapa FreeFire Advance Server Tidak Bisa Diunduh? Ini Penjelasannya!
  • Inilah Realita Biaya Hidup Mahasiswa di Bogor: Ternyata Nggak Semahal yang Kalian Kira!
  • Inilah Cara Blokir Email Spam di Gmail Biar Penyimpanan Nggak Gampang Penuh
  • Inilah Cara Aktivasi Keaktifan PTK di EMIS GTK IMP 2026 Biar Tunjangan Cair Lancar!
  • Inilah Cara Menilai Sumbangan yang Disetarakan dengan Uang Supaya Pajak Kalian Berkurang
  • Apa itu Pin di iMessage?
  • SKTP Nggak Muncul di Info GTK padahal Sudah Terbit? Ini Trik Rahasia Biar Data Langsung Update!
  • Ini Trik Nuyul Cari Cuan di Game Puzzle Farm 2026 Biar Koin Melimpah Tanpa Undang Teman
  • Inilah Ukuran Kertas Thermal 58mm ISO Di Word, Berapa dan Panduan Lengkap Memilihnya
  • Bukan Cuma Zakat! Ternyata Sumbangan Jenis Ini Bisa Ngurangin Pajak Kalian! Simak Penjelasannya
  • Inilah Caranya Mengajar Bahasa Indonesia di Amerika Serikat Lewat Beasiswa Fulbright FLTA 2026
  • Inilah 6 Rekomendasi HP yang Awet dan Tahan Lama Biar Kalian Nggak Gonta-ganti Terus!
  • Apa itu Proses BOP dan Psikotes BRI Life?
  • Ini Cara Input Tugas Tambahan Guru di EMIS GTK IMP 2026 Biar Jam Mengajar Aman!
  • APK Juice Pack Frenzy Penipuan? Benarkah Membayar atau Cuma Tipuan Iklan? Ini Faktanya!
  • Apakah Apk ReelAct Penipu? Mau Tarik 100 Dolar dari Reel Act? Cek Dulu Faktanya Biar Nggak Rugi Waktu!
  • Inilah Rekomendasi Game Turn Base Android dan PC Terbaik Buat Kalian yang Suka Strategi!
  • Inilah Cara Membuat Sertifikat di Canva dan Ukuran Standar yang Wajib Kalian Tahu
  • How to Run Massive AI Models on Your Mac: Unlocking Your Hidden VRAM Secrets
  • How to Create Gemini CLI Agent Skills
  • WTF? Ubuntu Planning Mandatory Age Verification
  • Why This Retro PC is Actually a Modern Beast: Maingear Retro98
  •  Windows 11 Taskbar Update: How to Move and Resize Your Taskbar Again
  • Prompt AI Menyusun Script Pola Suara Karakter agar Brand Jadi Ikonik
  • Prompt AI untuk Merancang Karakter Brand yang Ikonik
  • Prompt AI Audit Konten Sesuai Karakter Brand
  • Prompt AI Merubah Postingan LinkedIn Jadi Ladang Diskusi dengan ChatGPT
  • Prompt AI: Paksa Algoritma LinkedIn Promosikan Konten Kalian
  • 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
Beli Pemotong Rumput dengan Baterai IRONHOOF 588V Mesin Potong Rumput 88V disini https://s.shopee.co.id/70DBGTHtuJ
Beli Morning Star Kursi Gaming/Kantor disini: https://s.shopee.co.id/805iTUOPRV

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