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

  • Lagi Rame Botol Golda Viral 19 Detik? APA ITU? Jangan Asal Klik Link Sembarangan, Ini Bahayanya!
  • Apa itu Regedit FF Auto Headshot 100 No Password 2024? Simak Definisi dan Cara Kerjanya
  • Apa Itu KPH dan MPH? Pengertian dan Perbedaannya di Game Balap
  • Belum Tahu? Inilah Cara Aman Quotex Login dan Solusi Kalau Error!
  • Apa Itu Fitur Gestur Baru di Pixel Watch 4? Ini Pengertian dan Perbedaannya
  • Belum Tahu? Inilah Cara Aman Login Binomo dan Trik Trading Buat Pemula Biar Nggak Boncos
  • Cara Mengatasi Error ‘Versi Diagnostik Belum Terbarui’ (Your current version of diagnostics is not up to date)
  • Cara Membuat Newsletter di Outlook 365
  • Sering Telepon di Tempat Berisik? Fitur Baru Expressive Call dari Google Bakal Jadi Penyelamat Kalian!
  • Google Pixel 10 Pro Akan Punya Integrasi Play Points Lebih Dalam
  • Stop Cara Kuno! Ini Trik Supaya Manajemen Karyawan Jadi Lebih Cepat dan Anti Ribet
  • Bug di Aplikasi Cuaca Wear OS Google: Update Tidak Ngaruh!
  • Samsung Kembangkan Sensor Kamera Baru Pakai Teknologi Global Shutter dan Efek Blur Bergerak
  • Cara Membuat Anggaran Otomatis di Excel
  • Baseus X1 Pro Kamera: Kamera Ringkas dengan Fitur Canggih dan Harga yang Menarik
  • Profil Sosmed Kalian Sepi? Gini Caranya Makeover Bio Biar Makin Dilirik Sama Netizen!
  • Cara Mengatasi Error ‘Disk is Full or Read-Only’
  • Belum Tahu? Inilah Trik Ampuh Atasi Error ‘We Were Unable To Create Your Notebook’ di OneNote
  • Trik Instagram Stories 2025: Ubah Viewer Jadi Loyal Follower dengan Fitur Sederhana Ini
  • Turning TikTok into a Money-Making Machine
  • Cara Ekstrak Driver Intel RST/VMD dari setuprst.exe: Panduan Lengkap
  • Pixel 8 dan 8 Pro Akan Punya Kamera Baru Resolusi 10.2MP, Hasil Lebih Baik di Kondisi Redup
  • Inilah Trik Website Kalian Lolos Core Web Vitals dan Ranking Naik
  • YouTube TV Uji Coba Fitur Tonton Rekaman Pertandingan Olahraga NFL,NBA, MLB Terbatas
  • Aawi Wireless Dua Habis Stok, Model Android Auto Tunggal Masih Diskon
  • Samsung Akan Luncurkan One UI 8.5 dengan Inspirasi ‘Liquid Glass’ yang Memukau
  • XBox Game Pass PC Tidak Bisa Address GPU ke Game
  • Your Pocket-Sized Doctors: 3 Health Apps Changing the Game on Android and iOS
  • Waymo Bawa Teknologi ‘Liquid Glass’ untuk Mobil Otonom
  • Rumor Google Akan Update UI Besar-besaran Desember 2025
  • Ini Dia ESP32 P4: IoT RISC-V dengan Layar AMOLED dan LoRa, Perangkat Handheld Inovatif
  • Apa Itu HealthyPi-6? Solusi Open Source untuk Akuisisi Biosignal
  • Jetson THOR Industrial PC: 25Gbe Networking dan Bisa Pakai Kamera GMSL2
  • Azul Systems Akuisisi Payara Java Server
  • PC Kentang Jadi Ngebut? Coba GRML 2025, Distro Debian Ringan dengan Kernel 6.17!
  • Apa Itu US National Framework for AI? Kepres Donald Trump Bikin Heboh Dunia AI
  • Kenapa Bisnis Properti & Real Estate Harus Pakai AI, Ini Alasannya!
  • BARU! Brave Browser Bakal Bisa Ngerjain Tugas Kalian Secara Otomatis Lewat Agentic AI!
  • Belum Tahu? Google Maps Bakal Makin Canggih Berkat Integrasi Gemini Visual Ini!
  • Siap-Siap! Tahun 2026 Gemini Bakal “Menjajah” Chrome, iPhone, sampai Smartwatch Kalian
  • Apa itu Data Breach Coupang? Pengertian dan Kronologi Kebocoran Data Terbesar di Korea Selatan
  • Apa Itu CVE-2018-4063? Pengertian Celah Keamanan Sierra Wireless AirLink yang Masuk Katalog CISA
  • Apa Itu Ashen Lepus? Kelompok Peretas yang Mengincar Instansi Pemerintah Timur Tengah
  • Pengertian Vulnerability WebKit Apple Terbaru: Apa Itu CVE-2025-43529 dan CVE-2025-14174?
  • Apa Itu Fake OSINT? Definisi dan Bahaya Repositori GitHub Palsu

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