• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Debian

Install Newer Versions of MongoDB on Debian 7

How VPS by How VPS
November 1, 2019
in Debian
0
0
SHARES
15
VIEWS
Share on FacebookShare on Twitter

Contents

  1. 1. Add MongoDB public key
  2. 2. Add MongoDB repository
  3. 3. Update packages
  4. 4. Install MongoDB packages
  5. 5. Start MongoDB
  6. Want to contribute?


MongoDB is a fast and powerful NoSQL database. However, Debian repositories update slowly and often contain very old versions of packages. This tutorial explains how to install latest version of MongoDB from the official MongoDB repository.

At the time of writing, 3.0 was the current version of MongoDB.

All commands below must be performed from the root user.

1. Add MongoDB public key

The following command adds the MongoDB public GPG Key to the system key ring:

apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10

Debian package management tools need this key to ensure package consistency and authenticity.

2. Add MongoDB repository

Create a mongodb.list file to add the MongoDB repository to the system. The following command will create this file:

echo "deb http://repo.mongodb.org/apt/debian "$(lsb_release -sc)"/mongodb-org/3.0 main" | tee /etc/apt/sources.list.d/mongodb-org-3.0.list

3. Update packages

Use following command to get info about the lastest packages in repositories:

apt-get update

If you are familiar with Debian, you probably already know this command.

4. Install MongoDB packages

Now it’s time to install MongoDB. To install the latest stable version of MongoDB, use the following command:

apt-get install -y mongodb-org

mongodb-org is a “metapackage” that will automatically install the four component packages:

  • mongodb-org-server
  • mongodb-org-mongos
  • mongodb-org-shell
  • mongodb-org-tools

If you need a specific version of MongoDB, you can use the following command to choose the version of each component:

apt-get install -y mongodb-org=3.0.0 mongodb-org-server=3.0.0 mongodb-org-shell=3.0.0 mongodb-org-mongos=3.0.0 mongodb-org-tools=3.0.0

In this example, I have selected version 3.0.0.

5. Start MongoDB

After the installation finishes, MongoDB is automatically started. If you need to manually run the MongoDB server, then use the following command:

service mongod start

To stop the mongod process, use this command:

service mongod stop

And to restart mongod, use the following:

service mongod restart

The MongoDB shell can be accessed by running the following command. This allows you to connect to the MongoDB server.

mongo

When the shell is launched, you will see output in this format:

MongoDB shell version: 3.0.0
connecting to: test
>

Now you can use MongoDB on your Debian server.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

How to Install Kanboard on Debian 9

Next Post

How to Install CMS Made Simple 2.2 on a Debian 9 LAMP VPS

Next Post

How to Install CMS Made Simple 2.2 on a Debian 9 LAMP VPS

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet