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

  • Ketemu Link Video Viral ‘Petualangan Ustadzah Rahma’? Hati-hati, Kamu Bisa Dihack
  • Ikon Mic Roblox Hilang? Gini Caranya Mengaktifkan Kembali Voice Chat Biar Bisa Mabar Lagi!
  • Ini Cara Hapus Rombel Ganda di EMIS 4.0 yang Nggak Muncul Tombol Hapus
  • Inilah Kenapa Data Info GTK Kalian Nggak Berubah Padahal Dapodik Udah Sinkron
  • Belum Tahu CoreTax? Ini Trik Supaya Affiliator Lancar Lapor SPT Tahunan 2025 Tanpa Ribet
  • Inilah Cara Pendaftaran Peserta TKA SD dan SMP yang Benar Biar Nggak Salah Langkah!
  • Gagal Sinkron Dapodik 2026 C? Ini Trik Lengkap Supaya Berhasil Tanpa Pusing!
  • Cara Download Bukti Potong BPA1 di CoreTax, Nggak Perlu Ribet Minta HRD Lagi!
  • Cara Lapor SPT Tahunan di CoreTax Buat Pekerjaan Bebas, Ternyata Nggak Ribet Kalau Tahu Triknya!
  • Cara Beresin Siswa Tidak Teridentifikasi dan Rombel Ganda di EMIS 4.0
  • Cara Usul PIP di Dapodik 2026.B Biar Peserta Didik Kalian Dapat Bantuan!
  • Inilah Cara Awal Mengelola Web TKA Biar Nggak Pusing Pas Pelaksanaan!
  • Inilah Cara Mengatasi Masalah Jam Mengajar di InfoGTK Biar Cepat Valid!
  • Cara Atasi Residu Verval PD yang Tetap Muncul Padahal Sudah Hijau, Operator Sekolah Wajib Tahu!
  • Mau Cuan dari Nonton Drama di Cash Reels? Jangan Buru-buru Install Sebelum Baca Ini!
  • Tertipu Saldo Palsu? Apakah Game Layer Drop Penipu?
  • Inilah Syarat Terbaru dan Cara Daftar Bansos PKH-BPNT 2026 Lewat HP!
  • Inilah Trik Hubungkan Telegram ke WaIDN Biar Saldo Ngalir Terus!
  • Caranya Mengatasi Kode Verifikasi PayPal yang Nggak Pernah Nyampe di HP
  • Inilah Cara Cek Pencairan KJP Plus Januari 2026 Biar Nggak Bingung Lagi
  • Inilah Cara Cek Dana PIP yang Cair Senin 19 Januari 2026 Lewat HP!
  • Ingin Kuliah Gratis di 2026? Ini Cara Daftar KIP Kuliah via HP dan Syarat Lengkapnya!
  • Inilah Cara Cek Status KIS Bansos Aktif Secara Instan Lewat Smartphone Kamu!
  • Inilah Cara Cek NIK KTP Penerima Bansos PKH dan BPNT Januari 2026 yang Paling Gampang!
  • Ini Trik Ampuh Mengatasi Kode Verifikasi PayPal yang Nggak Kunjung Masuk!
  • Sering Gagal Transaksi? Ini Cara Mengatasi Kode FP2769 di BRImo yang Bikin Pusing!
  • Layar Oppo Muncul Error Hubungan Baterai? Gini Cara Beresinnya Sampai Tuntas!
  • Cara Munculin Menu Hadiah Melolo di iPhone
  • Inilah Cara Main Melolo Drama Biar Gak Boros Kuota dan Saldo Cair Terus!
  • Ini Trik Rahasia Cara Memunculkan Potongan Harga TikTok Shop yang Nggak Muncul di Akun Kalian!
  • Siapa itu Kelompok Hacker Silver Fox?
  • Apa itu CVE-2025-52691 SmarterMail? Celah Keamanan Paling Berbahaya Tahun 2025
  • Apa Itu ErrTraffic? Mengenal Platform ClickFix yang Bikin Website Jadi ‘Error’ Palsu
  • What is Reflex Framework? A Full-stack Python Framework
  • CloudFlare Acquired AstroJS!
  • Tutorial Python Deepseek Math v2
  • Cara Menggunakan SAM3D untuk Segmentasi dan Pembuatan Model 3D dari Teks
  • Cara Membuat AI Agent Super Cerdas dengan DeepAgents dan LangGraph
  • Perbedaan GPU vs TPU, Mana yang Terbaik
  • Tutorial Langfuse: Pantau & Optimasi Aplikasi LLM
  • Siapa itu Kelompok Hacker Silver Fox?
  • Apa itu CVE-2025-52691 SmarterMail? Celah Keamanan Paling Berbahaya Tahun 2025
  • Apa Itu ErrTraffic? Mengenal Platform ClickFix yang Bikin Website Jadi ‘Error’ Palsu
  • Ini Kronologi Hacking ESA (European Space Agency) 2025
  • Apa itu Zoom Stealer? Ini Definisi dan Bahaya Tersembunyi di Balik Ekstensi Browser Kalian
Beli Morning Star Kursi Gaming/Kantor disini: https://s.shopee.co.id/805iTUOPRV
Beli Pemotong Rumput dengan Baterai IRONHOOF 588V Mesin Potong Rumput 88V disini https://s.shopee.co.id/70DBGTHtuJ

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