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 Paket PLTS Hybrid 6kVA Aspro DML 600 yang Paling Powerful!
  • Suku Tsaatan: Suku Mongolia Penggembala Rusa Kutub
  • Game Happy Rush Terbukti Membayar atau Cuma Scam Iklan?
  • Cara Nonton Drama Dapat Duit di Free Flick, Tapi Awas Jangan Sampai Tertipu Saldo Jutaan!
  • APK Pinjol Rajindompet Penipu? Ini Review Aslinya
  • Keganggu Iklan Pop-Up Indosat Pas Main Game? Ini Trik Ampuh Matikannya!
  • Belum Tahu? Inilah Cara Upload Reels Instagram Sampai 20 Menit, Konten Jadi Lebih Puas!
  • Apa itu Negara Somaliland? Apa Hubungannya dengan Israel?
  • Apa itu Game TheoTown? Game Simulasi Jadi Diktator
  • Inilah Rekomendasi 4 HP Honor Terbaik – Prosesor Snapdragon Tahun 2026
  • Lagi Nyari HP Gaming Murah? Inilah 4 HP Asus RAM 8 GB yang Recomended
  • Ini Trik Main Game Merge Cats Road Trip Sampai Tarik Saldo ke DANA
  • Mau Jadi Digital Writer Pro? Ini Caranya Buat Portofolio Pakai Blog!
  • Ini Cara Login Banyak Akun FB & IG di Satu HP Tanpa Diblokir!
  • Inilah Cara Mengatasi Verval Siswa Silang Merah di RDM versi Hosting
  • HP Tertinggal? Inilah Caranya Login PDUM Langsung dari Laptop, Lebih Praktis!
  • Inilah Cara Tarik Dana dari APK Drama Rush
  • Inilah Cara Mudah Tarik Uang Kertas Biru di Merge Cats ke DANA dan OVO Tanpa Ribet!
  • Apakah Aplikasi Pinjaman KlikKami Penipu? Ada DC Penagih?
  • Kenapa Tentara Romawi Hanya Pakai Armor Kaki Saja?
  • Inilah Alasan Kenapa Beli Follower IG itu TIDAK AMAN!
  • EPIK! Kisah Mesin Bor Tercanggih Takluk di Proyek Terowongan Zojila Himalaya
  • Bingung Cari Lokasi Seseorang? Cek Cara Melacak Pemilik Nomor HP Tanpa Bayar Ini, Dijamin Akurat!
  • Apa itu Logis? Kenapa Logika Bisa Berbeda-beda?
  • Ini Alasan Kenapa Fitur Bing AI Sedang Trending dan Dicari Banyak Orang
  • Sejarah Kerajaan Champa: Bangsa Yang Hilang Tanpa Perang Besar, Kok Bisa?
  • Gini Caranya Dapat Weekly Diamond Pass Gratis di Event M7 Pesta, Ternyata Nggak Pake Modal!
  • Inilah Trik Rahasia Panen Token dan Skin Gratis di Event Pesta Cuan M7 Mobile Legends!
  • Apakah Apk Pinjaman Cepat Galaxy Pinjol Penipu?
  • Cara Tarik Saldo APK Game Clear Blast
  • Tailwind’s Revenue Down 80%: Is AI Killing Open Source?
  • Building Open Cloud with Apache CloudStack
  • TOP 1% AI Coding: 5 Practical Techniques to Code Like a Pro
  • Why Your Self-Hosted n8n Instance Might Be a Ticking Time Bomb
  • CES 2026: Real Botics Wants to Be Your Best Friend, but at $95k, Are They Worth the Hype?
  • Inilah Cara Belajar Cepat Model Context Protocol (MCP) Lewat 7 Proyek Open Source Terbaik
  • Inilah Cara Menguasai Tracing dan Evaluasi Aplikasi LLM Menggunakan LangSmith
  • Begini Cara Menggabungkan LLM, RAG, dan AI Agent untuk Membuat Sistem Cerdas
  • Cara Buat Sistem Moderasi Konten Cerdas dengan GPT-OSS-Safeguard
  • Inilah Cara Membuat Aplikasi Web Full-Stack Tanpa Coding dengan Manus 1.5
  • Apa itu CVE-2025-14847? Ini Penjelasan Lengkap MongoBleed
  • Ini Kronologi & Resiko Kebocoran Data WIRED
  • Apa itu Grubhub Crypto Scam? Ini Pengertian dan Kronologi Penipuan yang Catut Nama Grubhub
  • Apa Itu CVE-2025-59374? Mengenal Celah Keamanan ASUS Live Update yang Viral Lagi
  • Apa itu RansomHouse Mario? Ini Pengertian dan Mengenal Versi Baru ‘Mario’ yang Makin Bahaya
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