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

  • Bingung Pilih Paket? Inilah Perbedaan Telkomsel Data dan Telkomsel Data Flash yang Wajib Kalian Tahu!
  • Ini Alasan Pohon adalah Mahluk Hidup Terbesar di Dunia
  • Sempat Panas! Kronologi Perseteruan Cak Ji vs Madas di Surabaya, Gini Endingnya
  • Gila! Norwegia Bikin Terowongan Melayang di Bawah Laut
  • Cuma Terpisah 20 Mil, Kenapa Hewan di Bali dan Lombok Beda Total? Ternyata Ini Alasannya
  • Heboh Video Umari Viral 7 Menit 11 Detik dari Pakistan, Isinya Beneran Ada atau Cuma Jebakan Link? Cek Faktanya!
  • Tertipu Online atau HP Hilang? Ini Cara Melacak Nomor HP yang Nggak Tipu-Tipu!
  • Apakah Aplikasi Labora Bisa Hasilkan Uang Jutaan atau Cuma Tipu-Tipu?
  • Apakah APK Cashcash Pro Penipu? Cek Reviewnya Dulu
  • Google Kliks Communicator: Pengalaman Awal yang Mengejutkan – Apa yang Kami Rasakan?
  • Belum Tahu? Ini Ukuran Banner YouTube yang Pas Biar Channel Kalian Makin Kece!
  • Inilah Rencana Gila China Balap AS ke Bulan Sebelum 2030
  • Inilah Spesifikasi Resmi Macbook Pro M5 yang Masuk Indonesia
  • Nonton Drama Bisa Dapat Cuan? Simak Cara Main Yudia APK Biar Nggak Salah Langkah!
  • Cuma Nonton Drama Pendek Bisa Cair Saldo DANA? Cobain Aplikasi Melolo, Begini Caranya!
  • Nonton Drama Bisa Dapat Cuan? Jangan Senang Dulu, Simak Fakta Mengejutkan Aplikasi Cash Drama Ini!
  • Ini Video Asli Bocil Block Blast 1 VS 3 di TikTok, Awas Jangan Asal Klik Link Sembarangan!
  • Instapop Terbukti Membayar atau Cuma Tipuan? Cek Faktanya Sebelum Kalian Buang Waktu Main Game!
  • Geger Video Botol Coca Cola 24 Detik di TikTok, Jangan Asal Klik! Ini Fakta Sebenarnya
  • Apa itu Video Botol Makarizo Viral? Ini Faktanya
  • Apa itu Merge Fruit Master? Ini Pengertian dan Cara Main Game yang Katanya Bisa Menghasilkan Saldo
  • Apa itu Shortbox? Ini Pengertian dan Cara Menghasilkan Uang di Aplikasinya
  • Masih Bingung Bedanya CRM dan ERP? Ini Tips Cari Software CRM dan ERP Terbaik
  • Begini Cara Hapus Akun DANA Premium Secara Permanen!
  • Bukan Cuma Mitos! Ternyata Dinasti Song Punya Tempat Nongkrong Mirip PIK, Begini Isinya
  • Bukan Fiksi! Ini Bukti Manusia Punya ‘Kekuatan Super’ Akibat Mutasi Genetik dan Lingkungan
  • Dikelilingi Cincin Api, Kok Kalimantan Malah Nggak Punya Gunung Berapi? Ini Jawabannya!
  • Misteri Newgrange: Kuburan Batu 5.000 Tahun yang Menyimpan Peta Galaksi, Kok Bisa?
  • Transformasi Ekstrem Pesawat IL-96: Ganti 4 Mesin Jadi 2 Mesin Raksasa PD-35, Emang Bisa?
  • Apakah Aplikasi Cash Reels Penipu?
  • Apa itu Cosmic Desktop: Pengertian dan Cara Pasangnya di Ubuntu 26.04?
  • Apa Itu Auvidea X242? Pengertian Carrier Board Jetson T5000 dengan Dual 10Gbe
  • Elementary OS 8.1 Resmi Rilis: Kini Pakai Wayland Secara Standar!
  • Apa Itu Raspberry Pi Imager? Pengertian dan Pembaruan Versi 2.0.3 yang Wajib Kalian Tahu
  • Performa Maksimal! Ini Cara Manual Update Ubuntu ke Linux Kernel 6.18 LTS
  • Inilah Cara Melatih AI Agent Agar Bisa Belajar Sendiri Menggunakan Microsoft Agent Lightning
  • Tutorial Optimasi LangGraph dengan Node-Level Caching untuk Performa Lebih Cepat
  • Tutorial Membuat Game Dengan LangChain
  • X Terancam Sanksi Eropa Gara-Gara AI Grok Bikin Deepfake Anak Kecil
  • Nano Banana 2 Flash Itu Apa Sih? Ini Penjelasan Lengkapnya
  • Inilah Risiko Fatal yang Mengintai Kreator OnlyFans, Dari Doxxing sampai Penipuan!
  • Apa itu Kerentanan FortiCloud SSO? Ini Pengertian dan Bahayanya
  • Apa itu Covenant Health Data Breach? Ini Pengertian dan Kronologi Lengkapnya
  • Apa Itu Integrasi Criminal IP dan Cortex XSOAR? Ini Definisinya
  • Gawat! VVS Stealer Cuma Seharga Makan Siang Tapi Bisa Habisi Akun Discord 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